public void removeMembership(String groupMembershipUuid) {
    try (DbSession dbSession = dbClient.openSession(false)) {
      UserGroupDto userGroupDto = findMembershipOrThrow(groupMembershipUuid, dbSession);
      removeMembership(userGroupDto.getGroupUuid(), userGroupDto.getUserUuid());
    }
  }
@Test
  public void removeMemberByMembershipUuid_ifFound_shouldRemoveMemberFromGroup() {
    mockAdminInGroup(GROUP_A, USER_1);

    GroupDto groupDto = mockGroupDto();
    UserDto userDto = mockUserDto();
    UserGroupDto userGroupDto = new UserGroupDto().setUuid(UUID).setUserUuid(USER_1).setGroupUuid(GROUP_A);
    when(userGroupDao.selectByQuery(any(), any(), anyInt(), anyInt())).thenReturn(List.of(userGroupDto));

    groupMembershipService.removeMembership(UUID);

    verify(userGroupDao).selectByQuery(dbSession, new UserGroupQuery(UUID, null, null), 1, 1);
    verify(userGroupDao).delete(dbSession, groupDto, userDto);
    verify(dbSession).commit();
  }