From bd4c251c17b163fd35be7f6e3117318ff61f02cb Mon Sep 17 00:00:00 2001 From: Dinu John <86094133+dinujoh@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:45:14 -0500 Subject: [PATCH] Unit test fix Signed-off-by: Dinu John <86094133+dinujoh@users.noreply.github.com> --- .../dataprepper/plugins/mongo/stream/StreamWorkerTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/data-prepper-plugins/mongodb/src/test/java/org/opensearch/dataprepper/plugins/mongo/stream/StreamWorkerTest.java b/data-prepper-plugins/mongodb/src/test/java/org/opensearch/dataprepper/plugins/mongo/stream/StreamWorkerTest.java index a08ee816d1..369bd880b6 100644 --- a/data-prepper-plugins/mongodb/src/test/java/org/opensearch/dataprepper/plugins/mongo/stream/StreamWorkerTest.java +++ b/data-prepper-plugins/mongodb/src/test/java/org/opensearch/dataprepper/plugins/mongo/stream/StreamWorkerTest.java @@ -175,9 +175,7 @@ void test_processStream_checkPointIntervalSuccess() { when(streamDoc2.getResumeToken()).thenReturn(bsonDoc2); when(streamDoc3.getResumeToken()).thenReturn(bsonDoc3); when(cursor.next()) - .thenReturn(streamDoc1) - .thenReturn(streamDoc2) - .thenReturn(streamDoc3); + .thenReturn(streamDoc1, streamDoc2, streamDoc3); when(doc1.toJson(any(JsonWriterSettings.class))).thenReturn(UUID.randomUUID().toString()); when(doc2.toJson(any(JsonWriterSettings.class))).thenReturn(UUID.randomUUID().toString()); when(doc3.toJson(any(JsonWriterSettings.class))).thenReturn(UUID.randomUUID().toString());