code: public static Collection<SimplePrincipalProvider> getSimplePrincipals(
              Collection<PrincipalProvider<?>> principalProviders) {
          Collection<SimplePrincipalProvider> principals = new ArrayList<>();
          for (PrincipalProvider<?> principal : principalProviders) {
              if (principal instanceof SimplePrincipalProvider) {
                  principals.add((SimplePrincipalProvider) principal);
              }
          }
          return principals;
      }
docs: Extracts the simple principals of the collection of principals
  
  @param principalProviders the principals to extract from
  @return the simple principals