text: let nock = require('nock');
  
  module.exports.hash = "ff62dd44ddf13a9fa068eace2a1b3ecb";
  
  module.exports.testInfo = {"uniqueName":{"create-digitaltwin-conditionally-if-missing":"digitalTwin162506688632102008"},"newDate":{}}
  
  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',
    'ab0ecf3b-6c63-4cee-9015-19dffc3ff300',
    'x-ms-ests-server',
    '2.1.11829.9 - NCUS ProdSlices',
    'Set-Cookie',
    'fpc=Ag0kRxVsCxRKucMwVaNslXqpMdrgCQAAAHiEbtgOAAAA; expires=Fri, 30-Jul-2021 15:28:04 GMT; path=/; secure; HttpOnly; SameSite=None',
    'Set-Cookie',
    'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrctZS6sCckdhIWKnd7KRDEMERVzGInNxsqdD3PFH77zNbaHXmBYZSi0CSOo90-1Uk1TByhTeo927p6my6Yc0jXpO_0OugCDaIzkh9zNZBN70nHIxGxnE_qwMnJoUC1vzK3-xKJxc5GTxF10owVGBmhmuJdh79ZaJpqJo-lL0GA2YgAA; 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, 30 Jun 2021 15:28:03 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"],"kerberos_endpoint":"https://login.microsoftonline.com/12345678-1234-1234-1234-123456789012/kerberos","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',
    '8a28890c-3549-4e03-9c30-d31506d88301',
    'x-ms-ests-server',
    '2.1.11829.9 - SCUS ProdSlices',
    'Set-Cookie',
    'fpc=Ag0kRxVsCxRKucMwVaNslXqpMdrgCQAAAHiEbtgOAAAA; expires=Fri, 30-Jul-2021 15:28:04 GMT; path=/; secure; HttpOnly; SameSite=None',
    'Set-Cookie',
    'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrK0OodjF_6kj0FI9Y6FbgSHnsl-isW_DFrWsPTy97NcV98aC41qFOkv72DcWWXtu33pIlQufYEsiUfQtpJBhTUHHZYvvYllsCTHe5K8XkWfBlDGuKlhiwGRqQsBHm-8sBeKWaRiqPOEFZyAg_PgdR5rmzW_HwUChnE9sG6VZgCuogAA; 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, 30 Jun 2021 15:28:03 GMT',
    'Content-Length',
    '1753'
  ]);
  
  nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
    .post('/12345678-1234-1234-1234-123456789012/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.1.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=2|771,0|,&x-client-last-telemetry=2|0|||0,0&client-request-id=ef3f07a3-1acb-415d-b336-cd97a58f240c&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',
    '8a28890c-3549-4e03-9c30-d3150dd88301',
    'x-ms-ests-server',
    '2.1.11829.9 - SCUS ProdSlices',
    'x-ms-clitelem',
    '1,0,0,,',
    'Set-Cookie',
    'fpc=Ag0kRxVsCxRKucMwVaNslXqpMdrgCgAAAHiEbtgOAAAA; expires=Fri, 30-Jul-2021 15:28:04 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, 30 Jun 2021 15:28:04 GMT',
    'Content-Length',
    '1325'
  ]);
  
  nock('https://AZURE_DIGITALTWINS_URL.api.wus2.digitaltwins.azure.net:443', {"encodedQueryParams":true})
    .delete('/models/dtmi%3Asamples%3ADTTestBuilding%3B1')
    .query(true)
    .reply(404, {"error":{"code":"ModelNotFound","message":"There is no Model(s) available that matches the provided id(s) dtmi:samples:DTTestBuilding;1. Check that the Model ID provided is valid by doing a Model_List API call."}}, [
    'Content-Length',
    '214',
    'Content-Type',
    'application/json; charset=utf-8',
    'Strict-Transport-Security',
    'max-age=2592000',
    'traceresponse',
    '00-4cc38b2d2702e94982448c74e86af016-6074df7787906e4b-01',
    'Date',
    'Wed, 30 Jun 2021 15:28:04 GMT'
  ]);
  
  nock('https://AZURE_DIGITALTWINS_URL.api.wus2.digitaltwins.azure.net:443', {"encodedQueryParams":true})
    .post('/models', [{"@id":"dtmi:samples:DTTestBuilding;1","@type":"Interface","@context":"dtmi:dtdl:context;2","displayName":"Building","contents":[{"@type":"Property","name":"AverageTemperature","schema":"double"},{"@type":"Property","name":"TemperatureUnit","schema":"string"}]}])
    .query(true)
    .reply(201, [{"id":"dtmi:samples:DTTestBuilding;1","description":{},"displayName":{"en":"Building"},"decommissioned":false,"uploadTime":"2021-06-30T15:28:04.9992182+00:00"}], [
    'Content-Length',
    '161',
    'Content-Type',
    'application/json; charset=utf-8',
    'Strict-Transport-Security',
    'max-age=2592000',
    'traceresponse',
    '00-c295368099616a459da12dd12c4d07f3-85912fd63e2d8044-01',
    'Date',
    'Wed, 30 Jun 2021 15:28:04 GMT'
  ]);
  
  nock('https://AZURE_DIGITALTWINS_URL.api.wus2.digitaltwins.azure.net:443', {"encodedQueryParams":true})
    .delete('/digitaltwins/digitalTwin162506688632102008')
    .query(true)
    .reply(404, {"error":{"code":"DigitalTwinNotFound","message":"There is no digital twin instance that exists with the ID digitalTwin162506688632102008. Please verify that the twin id is valid and ensure that the twin is not deleted. See section on querying the twins http://aka.ms/adtv2query."}}, [
    'Content-Length',
    '282',
    'Content-Type',
    'application/json; charset=utf-8',
    'Strict-Transport-Security',
    'max-age=2592000',
    'traceresponse',
    '00-e4ed1d3e38ca60469d3620cd70043ae1-441444b9e4728146-01',
    'Date',
    'Wed, 30 Jun 2021 15:28:04 GMT'
  ]);
  
  nock('https://AZURE_DIGITALTWINS_URL.api.wus2.digitaltwins.azure.net:443', {"encodedQueryParams":true})
    .put('/digitaltwins/digitalTwin162506688632102008', {"$metadata":{"$model":"dtmi:samples:DTTestBuilding;1"},"AverageTemperature":68,"TemperatureUnit":"Celsius"})
    .query(true)
    .reply(200, {"$dtId":"digitalTwin162506688632102008","$etag":"W/\"60ab2ae4-d125-49cb-add2-1bedb1698e59\"","AverageTemperature":68,"TemperatureUnit":"Celsius","$metadata":{"$model":"dtmi:samples:DTTestBuilding;1","AverageTemperature":{"lastUpdateTime":"2021-06-30T15:28:05.1629538Z"},"TemperatureUnit":{"lastUpdateTime":"2021-06-30T15:28:05.1629538Z"}}}, [
    'Content-Length',
    '340',
    'Content-Type',
    'application/json; charset=utf-8',
    'ETag',
    'W/"60ab2ae4-d125-49cb-add2-1bedb1698e59"',
    'Strict-Transport-Security',
    'max-age=2592000',
    'traceresponse',
    '00-8f8e7045ace2d945b6041c5499838007-677abd8ad7eed74f-01',
    'Date',
    'Wed, 30 Jun 2021 15:28:05 GMT'
  ]);
  
  nock('https://AZURE_DIGITALTWINS_URL.api.wus2.digitaltwins.azure.net:443', {"encodedQueryParams":true})
    .put('/digitaltwins/digitalTwin162506688632102008', {"$metadata":{"$model":"dtmi:samples:DTTestBuilding;1"},"AverageTemperature":68,"TemperatureUnit":"Celsius"})
    .query(true)
    .reply(412, {"error":{"code":"PreconditionFailed","message":"If-None-Match: * header was specified but a twin with the id digitalTwin162506688632102008 was found. Please specify a different twin id."}}, [
    'Content-Length',
    '189',
    'Content-Type',
    'application/json; charset=utf-8',
    'Strict-Transport-Security',
    'max-age=2592000',
    'traceresponse',
    '00-cdcfff9450e3cb42a738df4348af9ff7-5ab6d342fe4b2045-01',
    'Date',
    'Wed, 30 Jun 2021 15:28:05 GMT'
  ]);
  
  nock('https://AZURE_DIGITALTWINS_URL.api.wus2.digitaltwins.azure.net:443', {"encodedQueryParams":true})
    .delete('/digitaltwins/digitalTwin162506688632102008')
    .query(true)
    .reply(204, "", [
    'Content-Length',
    '0',
    'Strict-Transport-Security',
    'max-age=2592000',
    'traceresponse',
    '00-2f9543426fe2ad4fbceac429c93d45bb-18122d3fce007d4c-01',
    'Date',
    'Wed, 30 Jun 2021 15:28:05 GMT'
  ]);
  
  nock('https://AZURE_DIGITALTWINS_URL.api.wus2.digitaltwins.azure.net:443', {"encodedQueryParams":true})
    .delete('/models/dtmi%3Asamples%3ADTTestBuilding%3B1')
    .query(true)
    .reply(204, "", [
    'Content-Length',
    '0',
    'Strict-Transport-Security',
    'max-age=2592000',
    'traceresponse',
    '00-4ba7644c9419a04d8e2a8ecf11fb84e6-474a39a09949b449-01',
    'Date',
    'Wed, 30 Jun 2021 15:28:05 GMT'
  ]);
  