CugPolicyImpl implements CugPolicy { @NotNull @Override public Set<Principal> getPrincipals() { return Sets.newHashSet(principals.values()); } CugPolicyImpl(@NotNull String oakPath, @NotNull NamePathMapper namePathMapper,
                  @NotNull PrincipalManager principalManager, int importBehavior, @NotNull CugExclude cugExclude);   CugPolicyImpl(@NotNull String oakPath, @NotNull NamePathMapper namePathMapper,
                  @NotNull PrincipalManager principalManager, int importBehavior,
                  @NotNull CugExclude cugExclude, @NotNull Iterable<Principal> principals, boolean immutable); @NotNull @Override Set<Principal> getPrincipals(); @Override boolean addPrincipals(@NotNull Principal... principals); @Override boolean removePrincipals(@NotNull Principal... principals); @Override String getPath();  }
@Test public void testGetPrincipals() { CugPolicyImpl cug = createCugPolicy(principals); Set<Principal> principalSet = cug.getPrincipals(); assertFalse(principalSet.isEmpty()); assertEquals(principals, principalSet); assertNotSame(principals, principalSet); }
@Test public void testGetPrincipals2() { CugPolicyImpl empty = createEmptyCugPolicy(); assertTrue(empty.getPrincipals().isEmpty()); }