docs: public void setLeader(MemberId leader) {
      if (!Objects.equals(this.leader, leader)) {
        if (leader == null) {
          this.leader = null;
        } else {
          // If a valid leader ID was specified, it must be a member that's currently a member of the
          // ACTIVE members configuration. Note that we don't throw exceptions for unknown members. It's
          // possible that a failure following a configuration change could result in an unknown leader
          // sending AppendRequest to this server. Simply configure the leader if it's known.
          DefaultRaftMember member = cluster.getMember(leader);
          if (member != null) {
            this.leader = leader;
            log.info("Found leader {}", member.memberId());
            electionListeners.forEach(l -> l.accept(member));
          }
        }
  
        this.lastVotedFor = null;
        meta.storeVote(null);
      }
    }