private void deleteDummyRole(String realm) throws IdRepoException, SSOException { SSOToken adminSSOToken = getAdminSSOToken(); AMIdentityRepository amir = new AMIdentityRepository(adminSSOToken, realm); AMIdentity amid = new AMIdentity(adminSSOToken, DUMMY_ROLE, IdType.ROLE, realm, null); Set<AMIdentity> set = new HashSet<AMIdentity>(2); set.add(amid); amir.deleteIdentities(set); }
@AfterClass public void cleanup() throws Exception { SSOToken adminToken = (SSOToken) AccessController.doPrivileged(AdminTokenAction.getInstance()); AMIdentityRepository amir = new AMIdentityRepository(adminToken, "/"); Set<AMIdentity> identities = new HashSet<AMIdentity>(); identities.add(group1); identities.add(group2); amir.deleteIdentities(identities); }