Unverified Commit d356278e authored by Esko Tajakka's avatar Esko Tajakka Committed by GitHub
Browse files

Update PagerSpliteratorTest.java

parent fc44476d
......@@ -46,6 +46,16 @@ public class PagerSpliteratorTest {
assertFalse(success);
}
@Test
public void shouldReturnFalseIfNextPagerItemMissing() {
when(pager.hasNext()).thenReturn(true);
when(pager.next()).thenReturn(Collections.emptyList());
boolean success = pagerSpliterator.tryAdvance(System.out::println);
assertFalse(success);
}
@Test
public void shouldThrowNullPointerExceptionWhenActionIsMissing() {
......@@ -75,4 +85,4 @@ public class PagerSpliteratorTest {
assertArrayEquals(new Integer[]{1, 2, 3, 4, 5}, elements);
}
}
\ No newline at end of file
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment