while(iter.hasNext())
{
Principal p = (Principal)iter.next();
if(p instanceof SimpleGroup)
{
SimpleGroup sg = (SimpleGroup)p;
ranAsserts = true;
assertTrue("testRole exists?", sg.isMember(new SimplePrincipal("testRole")));
assertTrue("testRole2 exists?", sg.isMember(new SimplePrincipal("testRole2")));
assertTrue("Role4 exists?", sg.isMember(new SimplePrincipal("Role4")));
if(replaceRole)
assertFalse("Role3 does not exist?", sg.isMember(new SimplePrincipal("Role3")));
else
assertTrue("Role3 exists?", sg.isMember(new SimplePrincipal("Role3")));
}
}
assertTrue("Ran Asserts?",ranAsserts);
}