@Test
public void testBecomeLeaderOnReceivingMajorityVotesInThreeNodeCluster() {

    MockRaftActorContext raftActorContext = createActorContext();
    raftActorContext.setLastApplied(raftActorContext.getReplicatedLog().lastIndex());
    raftActorContext.setPeerAddresses(setupPeers(2));
    candidate = new Candidate(raftActorContext);
    candidate = candidate.handleMessage(peerActors[0], new RequestVoteReply(1, true));
    assertEquals("Behavior", RaftState.Leader, candidate.state());
}