Skip to content

Commit b2e489c

Browse files
committed
emptyiterable ex
1 parent 1e1142b commit b2e489c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

guava/src/test/java/org/baeldung/hamcrest/HamcrestExamplesUnitTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import static org.hamcrest.Matchers.hasSize;
1313
import static org.hamcrest.Matchers.not;
1414
import static org.junit.Assert.assertThat;
15+
import static org.hamcrest.Matchers.emptyIterable;
1516

1617
import java.util.Collections;
1718
import java.util.List;
@@ -56,6 +57,7 @@ public final void whenVerifyingMultipleElementsArePartOfCollectionInAnyOrder_the
5657
public final void givenCollectionIsEmpty_whenChecking_thenEmpty() {
5758
final List<String> collection = Lists.newArrayList();
5859
assertThat(collection, empty());
60+
assertThat(collection, emptyIterable());
5961
}
6062

6163
@Test

0 commit comments

Comments
 (0)