public VoterSet lastValue() {
        Optional<LogHistory.Entry<VoterSet>> result = votersHistory.lastEntry();
        if (result.isPresent()) {
            return result.get().value();
        }

        return staticVoterSet
            .orElseThrow(() -> new IllegalStateException("No voter set found"));
    }
Returns the latest set of voters.
raft/src/main/java/org/apache/kafka/raft/internals/VoterSetHistory.java