private ConnectionParams createConnectionParams(String userName, String password) {
        ConnectionParams params = new ConnectionParams();

        params.setServerName("localhost");
        params.setServerApiPort(serverPort);
        params.setServerAgentPort(serverAgentPort);
        params.setUserName(userName);
        params.setPassword(password);

        return params;
    }
Helper method to create connection parameters to the server based on the
specified user credentials.

@param userName
@param password
@return
ambari-funtest/src/test/java/org/apache/ambari/funtest/server/tests/RoleBasedAccessControlBasicTest.java