@Test
public void testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot() {

    logStart("testHandleAppendEntriesSenderPrevLogIndexIsInTheSnapshot");
    MockRaftActorContext context = createActorContext();
    context.setReplicatedLog(new MockRaftActorContext.MockReplicatedLogBuilder().createEntries(5, 8, 3).build());
    context.getReplicatedLog().setSnapshotIndex(4);
    context.getReplicatedLog().setSnapshotTerm(3);
    AppendEntries appendEntries = new AppendEntries(3, "leader", 1, 3, Collections.emptyList(), 8, -1, (short)0);
    follower = createBehavior(context);
    RaftActorBehavior newBehavior = follower.handleMessage(leaderActor, appendEntries);
    Assert.assertSame(follower, newBehavior);
    AppendEntriesReply reply = MessageCollectorActor.expectFirstMatching(leaderActor, AppendEntriesReply.class);
    assertEquals("isSuccess", true, reply.isSuccess());
}