@Test
@SuppressWarnings("ObjectEqualsNull")
public void testEquals() throws SQLException, AuthorizeException, IOException, IllegalAccessException {

    new NonStrictExpectations(authorizeService.getClass())
    {{
        // Allow Item ADD perms (needed to create an Item)
        authorizeService.authorizeAction((Context) any, (Collection) any,
                Constants.ADD); result = null;
        authorizeService.authorizeAction((Context) any, (Item) any,
            Constants.WRITE); result = null;
        authorizeService.authorizeAction((Context) any, (Item) any,
            Constants.REMOVE); result = null;
        authorizeService.authorizeAction((Context) any, (Item) any,
            Constants.DELETE); result = null;
    }};
    assertFalse("testEquals 0", it.equals(null));
    Item item = createItem();
    try {
        assertFalse("testEquals 1",it.equals(item));
        assertTrue("testEquals 2", it.equals(it));
    } finally {
        itemService.delete(context, item);
    }
}