@Override
    public int leaveGroupEpoch() {
        return ShareGroupHeartbeatRequest.LEAVE_GROUP_MEMBER_EPOCH;
    }
@Test
    public void testLeaveGroupEpoch() {
        // Member should leave the group with epoch -1.
        ShareMembershipManager membershipManager = createMemberInStableState();
        mockLeaveGroup();
        membershipManager.leaveGroup();
        assertEquals(MemberState.LEAVING, membershipManager.state());
        assertEquals(ShareGroupHeartbeatRequest.LEAVE_GROUP_MEMBER_EPOCH,
                membershipManager.memberEpoch());
    }