// The user should still exist.
assertTrue(ums.userExists("mappedroleuser"));
// The group should still exist.
assertTrue(gms.groupExists("mappedgroup"));
// The permission should still exist.
assertTrue(pms.permissionExists(new PortletPermission("myportlet", "view")));
// The user-role mapping should be gone.
assertFalse(rms.isUserInRole("mappedroleuser", "mappedrole"));
// The group-role mapping should be gone.
assertFalse(rms.isGroupInRole("mappedgroup", "mappedroleuser"));
// The permission-role mapping should be gone.
Permissions perms = pms.getPermissions(new RolePrincipalImpl("mappedrole"));
assertFalse(perms.implies(new PortletPermission("myportlet", "view")));
destroyMappedRole();
}