@Test
public void testCanEditBooleanNoAuth() throws Exception
{

    // Test Inheritance of permissions
    new NonStrictExpectations(authorizeService.getClass())
    {{
        // Disallow Item WRITE perms
        authorizeService.authorizeActionBoolean((Context) any, (Item) any,
                Constants.WRITE); result = false;
        // Disallow parent Community WRITE and ADD perms
        authorizeService.authorizeActionBoolean((Context) any, (Community) any,
                Constants.WRITE, anyBoolean); result = false;
        authorizeService.authorizeActionBoolean((Context) any, (Community) any,
                Constants.ADD, anyBoolean); result = false;
        // Disallow parent Collection WRITE perms
        authorizeService.authorizeAction((Context) any, (Collection) any,
                Constants.WRITE, anyBoolean); result = new AuthorizeException();
    }};
    context.turnOffAuthorisationSystem();
    Collection c = createCollection();
    it.setOwningCollection(c);
    context.restoreAuthSystemState();
    assertFalse("testCanEditBooleanNoAuth 0", itemService.canEdit(context, it));
}