diff --git a/src/test/java/com/azure/cosmos/kafka/connect/source/CosmosDBSourceTaskTest.java b/src/test/java/com/azure/cosmos/kafka/connect/source/CosmosDBSourceTaskTest.java index a46ed27d..fe6c05d6 100644 --- a/src/test/java/com/azure/cosmos/kafka/connect/source/CosmosDBSourceTaskTest.java +++ b/src/test/java/com/azure/cosmos/kafka/connect/source/CosmosDBSourceTaskTest.java @@ -98,7 +98,7 @@ public void setup() throws IllegalAccessException { @Test public void testHandleChanges() throws JsonProcessingException, IllegalAccessException, InterruptedException { - String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\"}"; + String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\", \"_lsn\":\"2\"}"; ObjectMapper mapper = new ObjectMapper(); JsonNode actualObj = mapper.readTree(jsonString); List changes = new ArrayList<>(); @@ -125,7 +125,7 @@ public void testHandleChanges() throws JsonProcessingException, IllegalAccessExc @Test public void testPoll() throws InterruptedException, JsonProcessingException, IllegalAccessException { - String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\"}"; + String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\", \"_lsn\":\"2\"}"; ObjectMapper mapper = new ObjectMapper(); JsonNode actualObj = mapper.readTree(jsonString); List changes = new ArrayList<>(); @@ -145,7 +145,7 @@ public void testPoll() throws InterruptedException, JsonProcessingException, Ill @Test public void testPoll_shouldFillMoreRecordsFalse() throws InterruptedException, JsonProcessingException, IllegalAccessException { // test when should fillMoreRecords false, then poll method will return immediately - String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\"}"; + String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\", \"_lsn\":\"2\"}"; ObjectMapper mapper = new ObjectMapper(); JsonNode actualObj = mapper.readTree(jsonString); @@ -169,7 +169,7 @@ public void testPoll_shouldFillMoreRecordsFalse() throws InterruptedException, J @Test public void testPollWithMessageKey() throws InterruptedException, JsonProcessingException { - String jsonString = "{\"id\":123,\"k1\":\"v1\",\"k2\":\"v2\"}"; + String jsonString = "{\"id\":123,\"k1\":\"v1\",\"k2\":\"v2\", \"_lsn\":\"2\"}"; ObjectMapper mapper = new ObjectMapper(); JsonNode actualObj = mapper.readTree(jsonString); List changes = new ArrayList<>(); @@ -204,7 +204,7 @@ public void testSourceRecordOffset() throws InterruptedException, JsonProcessing @Test public void testZeroBatchSize() throws InterruptedException, JsonProcessingException, IllegalAccessException { - String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\"}"; + String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\", \"_lsn\":\"2\"}"; ObjectMapper mapper = new ObjectMapper(); JsonNode actualObj = mapper.readTree(jsonString); List changes = new ArrayList<>(); @@ -223,7 +223,7 @@ public void testZeroBatchSize() throws InterruptedException, JsonProcessingExcep @Test public void testSmallBufferSize() throws InterruptedException, JsonProcessingException, IllegalAccessException { - String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\"}"; + String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\", \"_lsn\":\"2\"}"; ObjectMapper mapper = new ObjectMapper(); JsonNode actualObj = mapper.readTree(jsonString); List changes = new ArrayList<>(); @@ -243,7 +243,7 @@ public void testSmallBufferSize() throws InterruptedException, JsonProcessingExc @Test(expected=IllegalStateException.class) public void testEmptyAssignedContainerThrowsIllegalStateException() throws InterruptedException, JsonProcessingException, IllegalAccessException { - String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\"}"; + String jsonString = "{\"k1\":\"v1\",\"k2\":\"v2\", \"_lsn\":\"2\"}"; ObjectMapper mapper = new ObjectMapper(); JsonNode actualObj = mapper.readTree(jsonString); List changes = new ArrayList<>();