public void testAppendEntriesWithNewerTerm() throws Exception {
Candidate candidate = new Candidate(mockRaftLog, scheduler, 1, mockRaftClient);
candidate.init(mockRaftStateContext);
Replica mockLeader = config.getReplica("other");
AppendEntries request =
AppendEntries.newBuilder()
.setTerm(4L)
.setLeaderId(mockLeader.toString())
.setPrevLogIndex(1L)
.setPrevLogTerm(1L)
.setCommitIndex(1L)
.build();