EmptyPrincipalProvider implements PrincipalProvider { @NotNull @Override public Set<Principal> getMembershipPrincipals(@NotNull Principal principal) { return Collections.emptySet(); } private  EmptyPrincipalProvider(); @Override Principal getPrincipal(@NotNull String principalName); @NotNull @Override Set<Principal> getMembershipPrincipals(@NotNull Principal principal); @NotNull @Override Set<? extends Principal> getPrincipals(@NotNull String userID); @NotNull @Override Iterator<? extends Principal> findPrincipals(@Nullable String nameHint, int searchType); @NotNull @Override Iterator<? extends Principal> findPrincipals(int searchType); static final PrincipalProvider INSTANCE; }
@Test public void testGetMembershipPrincipals() { assertTrue(principalProvider.getMembershipPrincipals(EveryonePrincipal.getInstance()).isEmpty()); assertTrue(principalProvider.getMembershipPrincipals(new PrincipalImpl(EveryonePrincipal.NAME)).isEmpty()); assertTrue(principalProvider.getMembershipPrincipals(testPrincipal).isEmpty()); }