Subject subject = lc.getSubject();
Set groups = subject.getPrincipals(Group.class);
assertTrue("Principals contains nobody", subject.getPrincipals().contains(new SimplePrincipal("nobody")));
assertTrue("Principals contains Roles", groups.contains(new SimplePrincipal("Roles")));
Group roles = (Group) groups.iterator().next();
assertTrue("Roles has no members", roles.members().hasMoreElements() == false);
lc.logout();
}
public void testNull() throws Exception
{