* @throws Exception
*/
public void testAdd1() throws Exception
{
InstantiationPermissions permissions = new InstantiationPermissions();
permissions.authorize(Page.class, new Roles("jonathan"));
permissions.authorize(Page.class, new Roles("johan"));
permissions.authorize(Page.class, new Roles("maurice"));
permissions.authorize(Page.class, new Roles("eelco"));
assertEquals(4, permissions.getRolesForComponentClass().get(Page.class).size());
permissions.unauthorize(Page.class, new Roles("maurice"));
assertEquals(3, permissions.getRolesForComponentClass().get(Page.class).size());
permissions.authorizeAll(Page.class);
assertEquals(null, permissions.getRolesForComponentClass().get(Page.class));
}