private Predicate createPredicate(String requestedUsername) {
    return new PredicateBuilder()
        .property(UserResourceProvider.USER_USERNAME_PROPERTY_ID)
        .equals(requestedUsername)
        .toPredicate();
  }
Test give a user Ambari administrative rights by assigning the user to the AMBARI.ADMINISTRATOR role
when creating the account. This is for backward compatibility to maintain the REST API V1 contract.
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java