@Test
public void testRollback() {

    // when replicatedToAllIndex = -1
    snapshotManager.capture(new SimpleReplicatedLogEntry(9, 6, new MockRaftActorContext.MockPayload()), -1);
    snapshotManager.persist(ByteState.empty(), Optional.empty(), Runtime.getRuntime().totalMemory());
    snapshotManager.rollback();
    verify(mockReplicatedLog).snapshotRollback();
    MessageCollectorActor.expectFirstMatching(actorRef, SnapshotComplete.class);
}