Collection extends DSpaceObject implements DSpaceObjectLegacySupport { public Group getAdministrators() { return admins; } protected  Collection(); @Override String getName(); Bitstream getLogo(); Group getSubmitters(); Group getAdministrators(); Group getWorkflowStep1(); Group getWorkflowStep2(); Group getWorkflowStep3(); String getLicenseCollection(); void setLicense(Context context, String license); Item getTemplateItem(); List<Community> getCommunities(); @Override boolean equals(Object other); @Override int hashCode(); @Override int getType(); void setWorkflowGroup(Context context, int step, Group g); @Override Integer getLegacyId(); @Transient
    static final String COPYRIGHT_TEXT; @Transient
    static final String INTRODUCTORY_TEXT; @Transient
    static final String SHORT_DESCRIPTION; @Transient
    static final String SIDEBAR_TEXT; @Transient
    static final String PROVENANCE_TEXT; }
@Test public void testRemoveAdministratorsAuth() throws Exception { new NonStrictExpectations(AuthorizeUtil.class) {{ AuthorizeUtil.authorizeManageAdminGroup((Context) any, (Collection) any); result = null; AuthorizeUtil.authorizeRemoveAdminGroup((Context) any, (Collection) any); result = null; }}; Group result = collectionService.createAdministrators(context, collection); assertThat("testRemoveAdministratorsAuth 0",collection.getAdministrators(), notNullValue()); assertThat("testRemoveAdministratorsAuth 1",collection.getAdministrators(), equalTo(result)); collectionService.removeAdministrators(context, collection); assertThat("testRemoveAdministratorsAuth 2", collection.getAdministrators(), nullValue()); }
@Test(expected=AuthorizeException.class) public void testRemoveAdministratorsNoAuth() throws Exception { new NonStrictExpectations(AuthorizeUtil.class) {{ AuthorizeUtil.authorizeManageAdminGroup((Context) any, (Collection) any); result = null; AuthorizeUtil.authorizeRemoveAdminGroup((Context) any, (Collection) any); result = new AuthorizeException(); }}; Group result = collectionService.createAdministrators(context, collection); assertThat("testRemoveAdministratorsAuth 0",collection.getAdministrators(), notNullValue()); assertThat("testRemoveAdministratorsAuth 1",collection.getAdministrators(), equalTo(result)); collectionService.removeAdministrators(context, collection); fail("Exception expected"); }
@Test public void testGetAdministrators() { assertThat("testGetAdministrators 0", collection.getAdministrators(), nullValue()); }