@Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    UserName userName1 = (UserName) o;
    return userName.equals(userName1.userName);
  }
Creates a UserName from the given string
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/UserName.java