@Test
public void testUpdateAuth2() throws Exception
{

    // Test permission inheritence
    new NonStrictExpectations(authorizeService.getClass())
    {{
        // Disallow Item WRITE perms
        authorizeService.authorizeAction((Context) any, (Item) any,
                Constants.WRITE); result = new AuthorizeException();
        // Allow parent Community WRITE and ADD perms
        authorizeService.authorizeActionBoolean((Context) any, (Community) any,
                Constants.WRITE, true); result = true;
        authorizeService.authorizeActionBoolean((Context) any, (Community) any,
                Constants.ADD, true); result = true;
        // Disallow parent Collection WRITE perms
        authorizeService.authorizeAction((Context) any, (Collection) any,
                Constants.WRITE, true); result = new AuthorizeException();
    }};
    context.turnOffAuthorisationSystem();
    Collection c = createCollection();
    it.setOwningCollection(c);
    context.restoreAuthSystemState();
    //TOOD: how to test?
    itemService.update(context, it);
}