@Test
public void testAddItemAuth() throws Exception
{

    new NonStrictExpectations(authorizeService.getClass())
    {{
        // Allow Collection ADD permissions
        authorizeService.authorizeAction((Context) any, (Collection) any,
                Constants.ADD); result = null;
        authorizeService.authorizeAction((Context) any, (Item) any,
                Constants.WRITE); result = null;
    }};
    WorkspaceItem workspaceItem = workspaceItemService.create(context, collection, false);
    Item item = installItemService.installItem(context, workspaceItem);
    collectionService.addItem(context, collection, item);
    boolean added = false;
    Iterator<Item> ii = itemService.findByCollection(context, collection);
    while(ii.hasNext())
    {
        if(ii.next().equals(item))
        {
            added = true;
        }
    }
    assertTrue("testAddItemAuth 0",added);
}