public static void createUser(ConnectionParams connectionParams, String clusterName,String userName,
                                 String password, AmbariUserRole userRole ) throws Exception {
        JsonElement jsonResponse;

        jsonResponse = RestApiUtils.executeRequest(new CreateUserWebRequest(connectionParams, userName, password,
                CreateUserWebRequest.ActiveUser.TRUE, CreateUserWebRequest.AdminUser.FALSE));

        LOG.info(jsonResponse);

        if (userRole != AmbariUserRole.NONE) {
            jsonResponse = RestApiUtils.executeRequest(new SetUserPrivilegeWebRequest(connectionParams,
                    clusterName, userName, userRole, PrincipalTypeEntity.USER_PRINCIPAL_TYPE_NAME));

            LOG.info(jsonResponse);
        }
    }
Creates a user with the specified role.

@param connectionParams
@param clusterName
@param userName
@param password
@param userRole
@throws Exception
ambari-funtest/src/test/java/org/apache/ambari/funtest/server/utils/ClusterUtils.java