public void transitionTo(ClassicGroupState groupState) {
        assertValidTransition(groupState);
        previousState = state;
        state = groupState;
        currentStateTimestamp = Optional.of(time.milliseconds());
        metrics.onClassicGroupStateTransition(previousState, state);
    }
Transition to a group state.
@param groupState the group state.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/classic/ClassicGroup.java