private boolean hasGenerationReset(Generation gen) {
        // the member ID might not be reset for ILLEGAL_GENERATION error, so only check generationID and protocol name here
        return gen.generationId == Generation.NO_GENERATION.generationId && gen.protocolName == null;
    }
Join the group and return the assignment for the next generation. This function handles both
JoinGroup and SyncGroup, delegating to {@link #onLeaderElected(String, String, List, boolean)} if
elected leader by the coordinator.

NOTE: This is visible only for testing

@return A request future which wraps the assignment returned from the group leader
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java