public static UserName fromString(String userName) {
    return new UserName(validated(userName));
  }
Creates a UserName from the given string
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/UserName.java