@Test
public void deleteGroupEPersonMembers() throws SQLException, AuthorizeException, EPersonDeletionException, IOException {

    EPerson ePerson =  null;
    context.turnOffAuthorisationSystem();
    try {
        Group toDeleteGroup = createGroup("toDelete");
        ePerson = createEPerson("deleteGroupEPersonMembers@dspace.org");
        groupService.addMember(context, toDeleteGroup, ePerson);
        groupService.update(context, toDeleteGroup);
        groupService.delete(context, toDeleteGroup);
        assertEquals("deleteGroupEPersonMembers", ePerson.getGroups().size(), 0);
    } finally {
        if(ePerson != null)
        {
            ePersonService.delete(context, ePerson);
        }
        context.restoreAuthSystemState();
    }
}