@Test
public void testUserInRole3() {
Subject s = new Subject();
Principal p = new SimplePrincipal("Barry");
s.getPrincipals().add(p);
Group group = new SimpleGroup("Roles", p);
Group subgroup = new SimpleGroup("subgroup");
subgroup.addMember(new SimpleGroup("friend"));
group.addMember(subgroup);
s.getPrincipals().add(group);
assertTrue(new DefaultSecurityContext(p, s).isUserInRole("friend"));
}