EmptyPrincipalProvider implements PrincipalProvider { @Override public Principal getPrincipal(@NotNull String principalName) { return null; } 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 testGetPrincipal() { assertNull(principalProvider.getPrincipal(EveryonePrincipal.NAME)); assertNull(principalProvider.getPrincipal(testPrincipal.getName())); }