@Test
public void testRemoveFrom() {

    replicatedLogImpl.append(new SimpleReplicatedLogEntry(4, 2, new MockPayload("E", 2)));
    replicatedLogImpl.append(new SimpleReplicatedLogEntry(5, 2, new MockPayload("F", 3)));
    assertEquals("dataSize", 9, replicatedLogImpl.dataSize());
    long adjusted = replicatedLogImpl.removeFrom(4);
    assertEquals("removeFrom - adjusted", 4, adjusted);
    assertEquals("size", 4, replicatedLogImpl.size());
    assertEquals("dataSize", 4, replicatedLogImpl.dataSize());
    takeSnapshot(1);
    adjusted = replicatedLogImpl.removeFrom(2);
    assertEquals("removeFrom - adjusted", 1, adjusted);
    assertEquals("size", 1, replicatedLogImpl.size());
    assertEquals("dataSize", 1, replicatedLogImpl.dataSize());
    assertEquals("removeFrom - adjusted", -1, replicatedLogImpl.removeFrom(0));
    assertEquals("removeFrom - adjusted", -1, replicatedLogImpl.removeFrom(100));
}