diff --git a/src/test/java/com/fauna/client/FeedIteratorTest.java b/src/test/java/com/fauna/client/FeedIteratorTest.java index b8e94680..9fafe57f 100644 --- a/src/test/java/com/fauna/client/FeedIteratorTest.java +++ b/src/test/java/com/fauna/client/FeedIteratorTest.java @@ -55,7 +55,7 @@ private CompletableFuture> successFuture(boolean after, int num "cursor0", System.currentTimeMillis() - 5, num + "-b", null, null)); - return CompletableFuture.supplyAsync(() -> FeedPage.builder(codec, client.getStatsCollector()).events(events).cursor("cursor0").hasNext(after).build()); + return CompletableFuture.supplyAsync(() -> FeedPage.builder(codec, new StatsCollectorImpl()).events(events).cursor("cursor0").hasNext(after).build()); } private CompletableFuture> failureFuture() throws IOException { @@ -91,8 +91,7 @@ public void test_single_page_without_calling_hasNext() throws IOException { @Test public void test_multiple_pages() throws IOException { - when(client.poll(argThat(source::equals), argThat(FeedOptions.DEFAULT::equals), any(Class.class))).thenReturn(successFuture(true, 0)); - when(client.poll(argThat(source::equals), argThat(opts -> opts.getCursor().orElse("").equals(CURSOR_0)), any(Class.class))).thenReturn(successFuture(false, 1)); + when(client.poll(argThat(source::equals), any(), any(Class.class))).thenReturn(successFuture(true, 0), successFuture(false, 1)); FeedIterator feedIterator = new FeedIterator<>(client, source, FeedOptions.DEFAULT, String.class); assertTrue(feedIterator.hasNext());