UserPrincipal user = new UserPrincipal("testUser");
RolePrincipal role = new RolePrincipal("testRole");
GroupPrincipal parentGroup = new GroupPrincipal("testParentGroup");
parentGroup.addMember(user);
GroupPrincipal childGroup = new GroupPrincipal("testChildGroup");
childGroup.addMember(role);
parentGroup.addMember(childGroup);
Set<Credential> creds = new LinkedHashSet<Credential>();
creds.add(new AssertionCredential(new ElementPuller().pull(new StringReader("<testAssertion/>"))));
creds.add(SOAPMessageCredentialExtractorTests.getBinarySecurityTokenCertificateCredential());
creds.add(new ConfidentialityCredential(true));