diff --git a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/WatchTest.java b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/WatchTest.java index 19295b901..d875c6411 100644 --- a/google-cloud-firestore/src/test/java/com/google/cloud/firestore/WatchTest.java +++ b/google-cloud-firestore/src/test/java/com/google/cloud/firestore/WatchTest.java @@ -24,11 +24,11 @@ import static com.google.cloud.firestore.LocalFirestoreHelper.UPDATED_FIELD_PROTO; import static com.google.cloud.firestore.LocalFirestoreHelper.map; import static com.google.cloud.firestore.LocalFirestoreHelper.string; +import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.*; import com.google.api.gax.grpc.GrpcStatusCode; @@ -169,10 +169,11 @@ public void before() { @After public void after() { - assertTrue(exceptions.isEmpty()); - assertTrue(requests.isEmpty()); - assertTrue(documentSnapshots.isEmpty()); - assertTrue(querySnapshots.isEmpty()); + Object[] emptyArray = new Object[0]; + assertArrayEquals(exceptions.toArray(), emptyArray); + assertArrayEquals(requests.toArray(), emptyArray); + assertArrayEquals(documentSnapshots.toArray(), emptyArray); + assertArrayEquals(querySnapshots.toArray(), emptyArray); listenerRegistration.remove(); }