@Test
public void shouldReturnNoUnappliedEntriesIfTheLogIsEmptyAndThereAreNoSnapshots() throws Exception {

    insertIntoLog(SENTINEL());
    store.setCommitIndex(0);
    when(snapshotsStore.getLatestSnapshot()).thenReturn(null);
    assertThat(algorithm.getNextCommitted(0), nullValue());
    assertThatLogContainsOnlySentinel();
    assertThatTermAndCommitIndexHaveValues(0, 0);
}