code: public static SimplePrincipalProvider getSimplePrincipalByName(Collection<PrincipalProvider<?>> principalProviders,
              String principalName) {
          for (SimplePrincipalProvider principal : getSimplePrincipals(principalProviders)) {
              if (principal.getName().equals(principalName)) {
                  return principal;
              }
          }
          return null;
      }
docs: Gives the simple principal with the given name from the given collection of principals
  
  @param principalProviders the principals to search
  @param principalName      the name to search
  @return the simple principal with the name