@Test
public void createHighWaterMarkWithExisting() {

    // Mock Kylo Catalog client
    final KyloCatalogClient client = Mockito.mock(KyloCatalogClient.class);
    Mockito.when(client.getHighWaterMarks()).thenReturn(Collections.singletonMap("mockWaterMark", "2018-04-29T15:05:03"));
    // Test creating high water mark
    final MockJdbcDataSetProvider provider = new MockJdbcDataSetProvider();
    final JdbcHighWaterMark highWaterMark = provider.createHighWaterMark("mockWaterMark", client);
    Assert.assertEquals("mockWaterMark", highWaterMark.getName());
    Assert.assertEquals(new Long(1525014303000L), highWaterMark.getValue());
    Mockito.reset(client);
    // Test adding a value
    highWaterMark.accumulate(86400000L);
    Mockito.verifyZeroInteractions(client);
    highWaterMark.accumulate(1532528828000L);
    Mockito.verify(client).setHighWaterMarks(Collections.singletonMap("mockWaterMark", "2018-07-25T14:27:08"));
}