text: let nock = require('nock');
  
  module.exports.hash = "aa49bc26dd2b5eaa4bd55c512d8cdb8f";
  
  module.exports.testInfo = {"uniqueName":{},"newDate":{}}
  
  nock('https://azure_managedhsm.managedhsm.azure.net:443', {"encodedQueryParams":true})
    .put('///providers/Microsoft.Authorization/roleDefinitions/foo')
    .query(true)
    .reply(401, "", [
    'content-type',
    'application/json; charset=utf-8',
    'x-ms-server-latency',
    '1',
    'x-content-type-options',
    'nosniff',
    'www-authenticate',
    'Bearer authorization="https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012", resource="https://managedhsm.azure.net"',
    'x-frame-options',
    'SAMEORIGIN',
    'content-length',
    '0',
    'x-ms-request-id',
    'b1aba6f0-a866-11eb-ac8d-000d3aab33d0',
    'strict-transport-security',
    'max-age=31536000; includeSubDomains',
    'content-security-policy',
    "default-src 'self'",
    'cache-control',
    'no-cache'
  ]);
  
  nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
    .get('/common/discovery/instance')
    .query(true)
    .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [
    'Cache-Control',
    'max-age=86400, private',
    'Content-Type',
    'application/json; charset=utf-8',
    'Strict-Transport-Security',
    'max-age=31536000; includeSubDomains',
    'X-Content-Type-Options',
    'nosniff',
    'Access-Control-Allow-Origin',
    '*',
    'Access-Control-Allow-Methods',
    'GET, OPTIONS',
    'P3P',
    'CP="DSP CUR OTPi IND OTRi ONL FIN"',
    'x-ms-request-id',
    'debe171d-f28c-43e7-bc2f-db960b802600',
    'x-ms-ests-server',
    '2.1.11654.16 - SCUS ProdSlices',
    'Set-Cookie',
    'fpc=Ajp62JUxeNNDt0Ku6Phhnl6nSoKICAAAAB_HG9gOAAAA; expires=Fri, 28-May-2021 21:14:18 GMT; path=/; secure; HttpOnly; SameSite=None',
    'Set-Cookie',
    'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr121759yJ1h1rWV6vDIWz5wbFJ9kpuAeTmOjfvS1fFMbQ8JYCX08KTtbkPf867Z7l0RbYI6yq8lWPCPJpNOlx-WRPuxTyYjDjl78xLJPMPRIuzwyAVHoeV6NySMnDn53vhEf6aELuDD80OIoYATVmshFdeBI7irfEM0UujHGHEaAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
    'Set-Cookie',
    'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
    'Set-Cookie',
    'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
    'Date',
    'Wed, 28 Apr 2021 21:14:17 GMT',
    'Content-Length',
    '980'
  ]);
  
  nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
    .get('/12345678-1234-1234-1234-123456789012/v2.0/.well-known/openid-configuration')
    .reply(200, {"token_endpoint":"https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [
    'Cache-Control',
    'max-age=86400, private',
    'Content-Type',
    'application/json; charset=utf-8',
    'Strict-Transport-Security',
    'max-age=31536000; includeSubDomains',
    'X-Content-Type-Options',
    'nosniff',
    'Access-Control-Allow-Origin',
    '*',
    'Access-Control-Allow-Methods',
    'GET, OPTIONS',
    'P3P',
    'CP="DSP CUR OTPi IND OTRi ONL FIN"',
    'x-ms-request-id',
    '8e30eed8-6132-4ee7-b258-30e2bbeeec00',
    'x-ms-ests-server',
    '2.1.11654.16 - WUS2 ProdSlices',
    'Set-Cookie',
    'fpc=Ajp62JUxeNNDt0Ku6Phhnl6nSoKICAAAAB_HG9gOAAAA; expires=Fri, 28-May-2021 21:14:18 GMT; path=/; secure; HttpOnly; SameSite=None',
    'Set-Cookie',
    'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_xAbB5gv7SEtMvqd_wW5QMoMAiUxO-dyTQRrznajG8WyX7nkrbh7p227Zj35stGJPVx2Pg2klUw_uPsGPXjpvxc0KksIfuxR4BsoleliLNSWixOZPmbRlJgSyBqO0EaXYhvl7Lu8ZyeRX1BzeIpDtoFiIIictttbSnkk-KSZUMMgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None',
    'Set-Cookie',
    'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
    'Set-Cookie',
    'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
    'Date',
    'Wed, 28 Apr 2021 21:14:18 GMT',
    'Content-Length',
    '1651'
  ]);
  
  nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
    .filteringRequestBody(function (body) {
              return body.replace(/client-request-id=[^&]*/g, "client-request-id=client-request-id");
          })
    .post('/12345678-1234-1234-1234-123456789012/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fmanagedhsm.azure.net%2F.default%20openid%20profile%20offline_access&grant_type=client_credentials&client-request-id=client-request-id&client_secret=azure_client_secret")
    .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
    'Cache-Control',
    'no-store, no-cache',
    'Pragma',
    'no-cache',
    'Content-Type',
    'application/json; charset=utf-8',
    'Expires',
    '-1',
    'Strict-Transport-Security',
    'max-age=31536000; includeSubDomains',
    'X-Content-Type-Options',
    'nosniff',
    'P3P',
    'CP="DSP CUR OTPi IND OTRi ONL FIN"',
    'x-ms-request-id',
    'a5c52bde-94ea-4558-8fb4-e0b7bbea4101',
    'x-ms-ests-server',
    '2.1.11654.16 - SCUS ProdSlices',
    'x-ms-clitelem',
    '1,0,0,,',
    'Set-Cookie',
    'fpc=Ajp62JUxeNNDt0Ku6Phhnl6nSoKICAAAAB_HG9gOAAAA; expires=Fri, 28-May-2021 21:14:18 GMT; path=/; secure; HttpOnly; SameSite=None',
    'Set-Cookie',
    'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
    'Set-Cookie',
    'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
    'Date',
    'Wed, 28 Apr 2021 21:14:18 GMT',
    'Content-Length',
    '1322'
  ]);
  
  nock('https://azure_managedhsm.managedhsm.azure.net:443', {"encodedQueryParams":true})
    .put('///providers/Microsoft.Authorization/roleDefinitions/foo', {"properties":{"roleName":"foo","type":"CustomRole","permissions":[],"assignableScopes":["/"]}})
    .query(true)
    .reply(400, {"error":{"code":"BadParameter","message":"Role definition name must be a GUID (Activity ID: b1e1ed82-a866-11eb-ac8d-000d3aab33d0)"}}, [
    'content-type',
    'application/json; charset=utf-8',
    'x-ms-server-latency',
    '1',
    'cache-control',
    'no-cache',
    'x-content-type-options',
    'nosniff',
    'content-length',
    '133',
    'x-ms-request-id',
    'b1e1ed82-a866-11eb-ac8d-000d3aab33d0',
    'strict-transport-security',
    'max-age=31536000; includeSubDomains',
    'content-security-policy',
    "default-src 'self'",
    'x-frame-options',
    'SAMEORIGIN'
  ]);
  