}
@Test
public void testMultipleRoles() {
Subject s = new Subject();
Principal p = new SimplePrincipal("Barry");
s.getPrincipals().add(p);
Set<Principal> roles = new HashSet<Principal>();
roles.add(new SimplePrincipal("role_friend"));
roles.add(new SimplePrincipal("role_admin"));
s.getPrincipals().addAll(roles);
LoginSecurityContext context = new RolePrefixSecurityContextImpl(s, "role_");
assertTrue(context.isUserInRole("role_friend"));
assertTrue(context.isUserInRole("role_admin"));