getAndAssertGroupPrincipals(_group1);
}
private void getAndAssertGroupPrincipals(Principal... expectedGroups)
{
GroupPrincipalAccessor groupPrincipalAccessor = new GroupPrincipalAccessor(Arrays.asList(_groupManager1, _groupManager2));
Set<Principal> actualGroupPrincipals = groupPrincipalAccessor.getGroupPrincipals(USERNAME);
Set<Principal> expectedGroupPrincipals = new HashSet<Principal>(Arrays.asList(expectedGroups));
assertEquals(expectedGroupPrincipals, actualGroupPrincipals);
}