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

    EPerson ePerson = null;
    Group specialGroup = null;
    try {
        specialGroup = createGroup("specialGroup");
        groupService.addMember(context, level1Group, specialGroup);
        groupService.update(context, level1Group);
        ePerson = createEPersonAndAddToGroup("isMemberContextGroupSpecialDbMembership@dspace.org", level2Group);
        context.setCurrentUser(ePerson);
        context.setSpecialGroup(specialGroup.getID());
        assertTrue(groupService.isMember(context, topGroup));
        assertTrue(groupService.isMember(context, level1Group));
        assertTrue(groupService.isMember(context, level2Group));
        assertTrue(groupService.isMember(context, specialGroup));
    } finally {
        if(ePerson != null)
        {
            context.turnOffAuthorisationSystem();
            ePersonService.delete(context, ePerson);
        }
        if(specialGroup != null)
        {
            context.turnOffAuthorisationSystem();
            groupService.delete(context, specialGroup);
        }
    }
}