From b2e489ca6460eb2316ff5f56830b2096685fb855 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Tue, 8 May 2018 21:16:49 +0300 Subject: [PATCH] emptyiterable ex --- .../java/org/baeldung/hamcrest/HamcrestExamplesUnitTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guava/src/test/java/org/baeldung/hamcrest/HamcrestExamplesUnitTest.java b/guava/src/test/java/org/baeldung/hamcrest/HamcrestExamplesUnitTest.java index 6b9cee1992..0ddeab90a1 100644 --- a/guava/src/test/java/org/baeldung/hamcrest/HamcrestExamplesUnitTest.java +++ b/guava/src/test/java/org/baeldung/hamcrest/HamcrestExamplesUnitTest.java @@ -12,6 +12,7 @@ import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.not; import static org.junit.Assert.assertThat; +import static org.hamcrest.Matchers.emptyIterable; import java.util.Collections; import java.util.List; @@ -56,6 +57,7 @@ public class HamcrestExamplesUnitTest { public final void givenCollectionIsEmpty_whenChecking_thenEmpty() { final List collection = Lists.newArrayList(); assertThat(collection, empty()); + assertThat(collection, emptyIterable()); } @Test