@Override
    public String toString() {
        return "ClassicGroupMetadata(" +
            "groupId=" + groupId + ", " +
            "generation=" + generationId + ", " +
            "protocolType=" + protocolType + ", " +
            "currentState=" + currentState() + ", " +
            "members=" + members + ")";
    }
Checks whether the transition to the target state is valid.

@param targetState the target state to transition to.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/classic/ClassicGroup.java