@Test(expected = AuthorizeException.class) public void testRemoveAdministratorsNoAuth() throws Exception { doNothing().when(authorizeServiceSpy).authorizeAction(context, c, Constants.ADMIN); context.turnOffAuthorisationSystem(); Group result = communityService.createAdministrators(context, c); context.restoreAuthSystemState(); assertThat("testRemoveAdministratorsAuth 0", c.getAdministrators(), notNullValue()); assertThat("testRemoveAdministratorsAuth 1", c.getAdministrators(), equalTo(result)); communityService.removeAdministrators(context, c); fail("Should have thrown exception"); }
public Group getAdministrators() { return admins; }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public Group getAdministrators() { return admins; } }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public Group getAdministrators() { return admins; } protected  Community(); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public Group getAdministrators() { return admins; } protected  Community(); void removeSubCommunity(Community subCommunity); Bitstream getLogo(); Group getAdministrators(); List<Collection> getCollections(); List<Community> getSubcommunities(); List<Community> getParentCommunities(); void removeParentCommunity(Community parentCommunity); @Override boolean equals(Object other); @Override int hashCode(); @Override int getType(); @Override String getName(); @Override Integer getLegacyId(); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public Group getAdministrators() { return admins; } protected  Community(); void removeSubCommunity(Community subCommunity); Bitstream getLogo(); Group getAdministrators(); List<Collection> getCollections(); List<Community> getSubcommunities(); List<Community> getParentCommunities(); void removeParentCommunity(Community parentCommunity); @Override boolean equals(Object other); @Override int hashCode(); @Override int getType(); @Override String getName(); @Override Integer getLegacyId(); static final String COPYRIGHT_TEXT; static final String INTRODUCTORY_TEXT; static final String SHORT_DESCRIPTION; static final String SIDEBAR_TEXT; }