@Test
public void testRemoveDSpaceLicenseAuth() throws Exception
{

    new NonStrictExpectations(authorizeService.getClass())
    {{
        // Allow Item ADD and REMOVE perms
        authorizeService.authorizeAction((Context) any, (Item) any,
                Constants.ADD); result = null;
        authorizeService.authorizeAction((Context) any, (Item) any,
                Constants.REMOVE); result = null;
        authorizeService.authorizeAction((Context) any, (Item) any,
                Constants.DELETE); result = null;
    }};
    String name = "LICENSE";
    Bundle created = bundleService.create(context, it, name);
    created.setName(context, name);
      it.addBundle(created);
    itemService.removeDSpaceLicense(context, it);
    assertThat("testRemoveDSpaceLicenseAuth 0", itemService.getBundles(it, name), notNullValue());
    assertTrue("testRemoveDSpaceLicenseAuth 1", itemService.getBundles(it, name).size() == 0);
}