{
LdapDataHelper.seedGroupData(gpUid2);
assertTrue("getUserPrincipals should have returned more than one user.", grHandler.getGroupPrincipals("*")
.size() > 1);
String fullPath = (new GroupPrincipalImpl(gpUid1)).getFullPath();
List groups = grHandler.getGroupPrincipals(fullPath);
assertTrue("getGroupPrincipals should have returned one group.", groups.size() == 1);
assertTrue("List should have consisted of GroupPrincipal objects.", groups.get(0) instanceof GroupPrincipal);
String localUid = Integer.toString(rand.nextInt()).toString();
assertTrue("getGroupPrincipals should not have found any groups with the specified filter.", grHandler
.getGroupPrincipals(new GroupPrincipalImpl(localUid).getFullPath()).isEmpty());
}
finally
{
LdapDataHelper.removeGroupData(gpUid2);
}