docs: protected PollResponse handlePoll(PollRequest request) {
      // If the request term is not as great as the current context term then don't
      // vote for the candidate. We want to vote for candidates that are at least
      // as up to date as us.
      if (request.term() < raft.getTerm()) {
        log.debug("Rejected {}: candidate's term is less than the current term", request);
        return PollResponse.builder()
            .withStatus(RaftResponse.Status.OK)
            .withTerm(raft.getTerm())
            .withAccepted(false)
            .build();
      } else if (isLogUpToDate(request.lastLogIndex(), request.lastLogTerm(), request)) {
        return PollResponse.builder()
            .withStatus(RaftResponse.Status.OK)
            .withTerm(raft.getTerm())
            .withAccepted(true)
            .build();
      } else {
        return PollResponse.builder()
            .withStatus(RaftResponse.Status.OK)
            .withTerm(raft.getTerm())
            .withAccepted(false)
            .build();
      }
    }