public String vote(Set<String> candidates) {
        for (JoinGroupRequestProtocol protocol : supportedProtocols) {
            if (candidates.contains(protocol.name())) {
                return protocol.name();
            }
        }

        throw new IllegalArgumentException("Member does not support any of the candidate protocols");
    }
Vote for one of the potential group protocols. This takes into account the protocol preference as
indicated by the order of supported protocols and returns the first one also contained in the set

@param candidates The protocol names that this member can vote for
@return the first supported protocol that matches one of the candidates
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/classic/ClassicGroupMember.java