List<AclContext> contexts;
formalSubject = new Subject();
formalSubject.getPrincipals().add(new Username("yml_usr_1"));
contexts = policies.narrowContext(formalSubject, environment);
assertNotNull("Context is null.", contexts);
assertEquals("Incorrect number of contexts returned when matching on group.", 1, contexts.size());
formalSubject = new Subject();
formalSubject.getPrincipals().add(new Username("test_1"));
formalSubject.getPrincipals().add(new Group("admin")); // <-- will match on group membership.
contexts = policies.narrowContext(formalSubject, environment);
assertNotNull("Context is null.", contexts);
assertEquals("Incorrect number of contexts returned when matching on group.", 1, contexts.size());