private Set<String> convertToLowercase(Set<String> groups) {
    Set<String> lowercaseGroups = new HashSet<>();

    if (groups != null) {
      for (String group : groups) {
        lowercaseGroups.add(group.toLowerCase());
      }
    }

    return lowercaseGroups;
  }
Synchornizes the OS-level groups assigned to the OS-level user with the groups assigned to the
Ambari user in Ambari

@param unixUser   the user
@param userEntity the ambari user
ambari-server/src/main/java/org/apache/ambari/server/security/authentication/pam/AmbariPamAuthenticationProvider.java