subject = lc.getSubject();
groups = subject.getPrincipals(Group.class);
assertTrue("Principals contains jduke", subject.getPrincipals().contains(new SimplePrincipal("jduke")));
assertTrue("Principals contains Roles", groups.contains(new SimplePrincipal("Roles")));
roles = (Group) groups.iterator().next();
Enumeration iter = roles.members();
while( iter.hasMoreElements() )
log.debug(iter.nextElement());
// Only the roles from the DatabaseServerLoginModule should exist
assertTrue("Role1 is NOT a role", !roles.isMember(new SimplePrincipal("Role1")));
assertTrue("Role2 is NOT a role", !roles.isMember(new SimplePrincipal("Role2")));