{
LdapDataHelper.seedRoleData(gpUid2);
assertTrue("getUserPrincipals should have returned more than one user.", roleHandler.getRolePrincipals("*")
.size() > 1);
String fullPath = (new RolePrincipalImpl(roleUid1)).getFullPath();
List roles = roleHandler.getRolePrincipals(fullPath);
assertTrue("getRolePrincipals should have returned one role.", roles.size() == 1);
assertTrue("List should have consisted of RolePrincipal objects.", roles.get(0) instanceof RolePrincipal);
String localUid = Integer.toString(rand.nextInt()).toString();
assertTrue("getRolePrincipals should not have found any roles with the specified filter.", roleHandler
.getRolePrincipals(new RolePrincipalImpl(localUid).getFullPath()).isEmpty());
}
finally
{
LdapDataHelper.removeRoleData(gpUid2);
}