@Test public void getCheckpoint_putAndGet_correctSequenceMustReturn() { remoteDb.putCheckpoint(REPLICATOR_IDENTIFIER, SEQUENCE_1); String sequence1 = remoteDb.getCheckpoint(REPLICATOR_IDENTIFIER); Assert.assertEquals(SEQUENCE_1, sequence1); remoteDb.putCheckpoint(REPLICATOR_IDENTIFIER, SEQUENCE_2); String sequence2 = remoteDb.getCheckpoint(REPLICATOR_IDENTIFIER); Assert.assertEquals(SEQUENCE_2, sequence2); }
@Test(expected = IllegalArgumentException.class) public void getCheckpoint_emptyCheckpointId_exception() { remoteDb.getCheckpoint(""); }
@Test public void getCheckpoint_getNotExist_nullMustBeReturn() { String sequence = remoteDb.getCheckpoint(REPLICATOR_IDENTIFIER); Assert.assertThat(sequence, is(nullValue())); }