private void testFencedMemberReleasesAssignmentAndTransitionsToJoining(MembershipManager membershipManager) {
        mockMemberHasAutoAssignedPartition();

        membershipManager.transitionToFenced();

        assertEquals(MEMBER_ID, membershipManager.memberId());
        assertEquals(0, membershipManager.memberEpoch());
        assertEquals(MemberState.JOINING, membershipManager.state());
    }
Fenced member should release assignment, reset epoch to 0, keep member ID, and transition
to JOINING to rejoin the group.
clients/src/test/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImplTest.java