@Test(expected=AuthorizeException.class)
public void testSetLogoNoAuth() throws Exception
{

    // Test inheritance of permissions
    new NonStrictExpectations(authorizeService.getClass())
    {{
        // Disallow parent Community ADD perms
        authorizeService.authorizeActionBoolean((Context) any, (Community) any,
                Constants.ADD, true); result = false;
        // Disallow parent Community WRITE perms
        authorizeService.authorizeActionBoolean((Context) any, (Community) any,
                Constants.WRITE, true); result = false;
        // Disallow Collection WRITE perms
        authorizeService.authorizeAction((Context) any, (Collection) any,
                Constants.WRITE, true); result = new AuthorizeException();
    }};
    File f = new File(testProps.get("test.bitstream").toString());
    Bitstream logo = collectionService.setLogo(context, collection, new FileInputStream(f));
    fail("EXception expected");
}