diff --git a/data-prepper-plugins/mongodb/src/test/java/org/opensearch/dataprepper/plugins/mongo/buffer/ExportRecordBufferWriterTest.java b/data-prepper-plugins/mongodb/src/test/java/org/opensearch/dataprepper/plugins/mongo/buffer/ExportRecordBufferWriterTest.java index f1efdbcad4..57fd63681a 100644 --- a/data-prepper-plugins/mongodb/src/test/java/org/opensearch/dataprepper/plugins/mongo/buffer/ExportRecordBufferWriterTest.java +++ b/data-prepper-plugins/mongodb/src/test/java/org/opensearch/dataprepper/plugins/mongo/buffer/ExportRecordBufferWriterTest.java @@ -112,7 +112,7 @@ void test_writeSingleRecordToBufferWithAcknowledgementSet() throws Exception { pluginMetrics); recordBufferWriter.writeToBuffer(acknowledgementSet, List.of(event)); verify(bufferAccumulator).add(recordArgumentCaptor.capture()); - verify(acknowledgementSet).add(event); + verify(acknowledgementSet).add(event.getEventHandle()); assertThat(recordArgumentCaptor.getValue().getData(), equalTo(event)); verify(bufferAccumulator).flush(); @@ -129,10 +129,10 @@ void test_writeSingleRecordFlushException() throws Exception { recordBufferWriter.writeToBuffer(acknowledgementSet, List.of(event)); verify(bufferAccumulator).add(recordArgumentCaptor.capture()); - verify(acknowledgementSet).add(event); + verify(acknowledgementSet).add(event.getEventHandle()); assertThat(recordArgumentCaptor.getValue().getData(), equalTo(event)); verify(bufferAccumulator).flush(); verify(exportRecordErrors).increment(1); } -} \ No newline at end of file +}