{
	"info": {
		"_postman_id": "87707266-b670-4215-b981-8ba4bd7aa931",
		"name": "uniform-service active test !manual!",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "uniform-service-active test",
			"item": [
				{
					"name": "settings esb",
					"item": [
						{
							"name": "Create profile system1",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/xml",
										"type": "text"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{adminLogin}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:createProfileRequest>\n         <sys:profileName>{{system1_id}}</sys:profileName>\n         <sys:uuid>{{system1_id}}</sys:uuid>\n         <!--Optional:-->\n         <sys:description>description1</sys:description>\n      </sys:createProfileRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Add Account system1",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
											"    var jsonObject = xml2Json(soapBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/xml",
										"type": "text"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{adminLogin}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bas=\"http://www.entaxy.ru/basic-auth-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <bas:accountList>\n         <!--1 or more repetitions:-->\n         <bas:account>\n            <bas:login>{{system1_id}}</bas:login>\n            <bas:password>{{system1_id}}</bas:password>\n            <!--Optional:-->\n            <bas:systemUUID>{{system1_id}}</bas:systemUUID>\n            <!--Optional:-->\n            <bas:systemName>{{system1_id}}</bas:systemName>\n         </bas:account>\n      </bas:accountList>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/basic-auth-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"basic-auth-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create uniform-service-passive-in-connector",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/xml",
										"type": "text"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{adminLogin}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:createConnectorRequest>\n         <sys:templateName>uniform-service-passive-in-connector</sys:templateName>\n         <sys:profileUuid>{{system1_id}}</sys:profileUuid>\n         <sys:paramList>\n            <!--Zero or more repetitions:-->\n         </sys:paramList>\n      </sys:createConnectorRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create profile system_active",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "basic",
									"basic": [
										{
											"key": "password",
											"value": "admin",
											"type": "string"
										},
										{
											"key": "username",
											"value": "admin",
											"type": "string"
										}
									]
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"type": "text",
										"value": "application/xml"
									},
									{
										"key": "X-ForwardedUser",
										"type": "text",
										"value": "{{adminLogin}}"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:createProfileRequest>\n         <sys:profileName>{{system_active}}</sys:profileName>\n         <sys:uuid>{{system_active}}</sys:uuid>\n         <!--Optional:-->\n         <sys:description>descriptionSA</sys:description>\n      </sys:createProfileRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create uniform-service-active-in-connector",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "basic",
									"basic": [
										{
											"key": "password",
											"value": "admin",
											"type": "string"
										},
										{
											"key": "username",
											"value": "admin",
											"type": "string"
										}
									]
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"type": "text",
										"value": "application/xml"
									},
									{
										"key": "X-ForwardedUser",
										"type": "text",
										"value": "{{adminLogin}}"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n    <soapenv:Header/>\n    <soapenv:Body>\n        <sys:createConnectorRequest>\n            <sys:templateName>uniform-service-active-in-connector</sys:templateName>\n            <sys:profileUuid>{{system1_id}}</sys:profileUuid>\n            <sys:paramList>\n                <sys:param>\n                    <sys:name>period</sys:name>\n                    <sys:value>1m</sys:value>\n                </sys:param>\n                <sys:param>\n                    <sys:name>password</sys:name>\n                    <sys:value></sys:value>\n                </sys:param>\n                <sys:param>\n                    <sys:name>endpointUrl</sys:name>\n                    <sys:value>{{base_url}}/active_connector_test_consumer</sys:value>\n                </sys:param>\n                <sys:param>\n                    <sys:name>username</sys:name>\n                    <sys:value>admin</sys:value>\n                </sys:param>\n            </sys:paramList>\n        </sys:createConnectorRequest>\n    </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create uniform-service-active-out-connector",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "basic",
									"basic": [
										{
											"key": "password",
											"value": "admin",
											"type": "string"
										},
										{
											"key": "username",
											"value": "admin",
											"type": "string"
										}
									]
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"type": "text",
										"value": "application/xml"
									},
									{
										"key": "X-ForwardedUser",
										"type": "text",
										"value": "{{adminLogin}}"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n    <soapenv:Header/>\n    <soapenv:Body>\n        <sys:createConnectorRequest>\n            <sys:templateName>uniform-service-active-out-connector</sys:templateName>\n            <sys:profileUuid>{{system_active}}</sys:profileUuid>\n            <sys:paramList>\n                <sys:param>\n                    <sys:name>password</sys:name>\n                    <sys:value></sys:value>\n                </sys:param>\n                <sys:param>\n                    <sys:name>endpointUrl</sys:name>\n                    <sys:value>{{base_url}}/active_connector_test_consumer</sys:value>\n                </sys:param>\n                <sys:param>\n                    <sys:name>isActive</sys:name>\n                    <sys:value>true</sys:value>\n                </sys:param>\n                <sys:param>\n                    <sys:name>username</sys:name>\n                    <sys:value>admin</sys:value>\n                </sys:param>\n            </sys:paramList>\n        </sys:createConnectorRequest>\n    </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get profile",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"var systemId = pm.environment.get(\"system1_id\");",
											"",
											"pm.test(\"Body matches \" + systemId, function () {",
											"    pm.expect(pm.response.text()).to.include(systemId);",
											"});",
											"",
											"var connectorName = pm.globals.get(\"template_name\") + \"-\" + systemId;",
											"",
											"pm.test(\"Body matches \" + connectorName, function () {",
											"    pm.expect(pm.response.text()).to.include(connectorName);",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"type": "text",
										"value": "application/xml"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{adminLogin}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:getProfileRequest>\n         <sys:uuid>{{system_active}}</sys:uuid>\n      </sys:getProfileRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create permission",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "basic",
									"basic": [
										{
											"key": "password",
											"value": "admin",
											"type": "string"
										},
										{
											"key": "username",
											"value": "admin",
											"type": "string"
										}
									]
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"type": "text",
										"value": "application/xml"
									},
									{
										"key": "X-ForwardedUser",
										"type": "text",
										"value": "{{adminLogin}}"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:createPermissionRequest>\n         <sys:objectUuid>{{system1_id}}</sys:objectUuid>\n         <sys:subjectUuid>{{system_active}}</sys:subjectUuid>\n      </sys:createPermissionRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "send message",
					"item": [
						{
							"name": "SEND",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"function getSoapBody() {",
											"    var soapBody = responseBody.match(/<soap:Envelope[\\s\\S]*soap:Envelope>/g);",
											"    var jsonObject = xml2Json(soapBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is OK\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response['response']['status']).to.eql('200');",
											"});",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/xml; charset=UTF-8",
										"type": "text"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{system1_id}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.entaxy.ru/ExchangeTypes/1.0\">\n    <soapenv:Header/>\n    <soapenv:Body>\n        <ns:packets>\n            <ns:packet>\n                <ns:header>\n                    <ns:destination>\n                        <ns:id>{{system_active}}</ns:id>\n                    </ns:destination>\n                </ns:header>\n                <ns:message>\n                    <ns:messageUUID>b7e6aab7-8f02-443c-8f67-e2d638dd4da0</ns:messageUUID>\n                    <ns:exchangePattern>InOnly</ns:exchangePattern>\n                    <ns:source>\n                        <ns:id>{{system1_id}}</ns:id>\n                    </ns:source>\n                    <ns:content>\n                        <test/>\n                    </ns:content>\n                </ns:message>\n            </ns:packet>\n        </ns:packets>\n    </soapenv:Body>\n</soapenv:Envelope>"
								},
								"url": {
									"raw": "{{base_url}}/uniform-exchange",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"uniform-exchange"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "manage active profiles",
					"item": [
						{
							"name": "Stop IN connector",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/xml",
										"type": "text"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{adminLogin}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:stopConnectorRequest>\n         <sys:templateName>uniform-service-active-in-connector</sys:templateName>\n         <sys:profileUuid>{{system_active}}</sys:profileUuid>\n      </sys:stopConnectorRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Start IN connector",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/xml",
										"type": "text"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{adminLogin}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:startConnectorRequest>\n         <sys:templateName>uniform-service-active-in-connector</sys:templateName>\n         <sys:profileUuid>{{system_active}}</sys:profileUuid>\n      </sys:startConnectorRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Stop OUT connector",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/xml",
										"type": "text"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{adminLogin}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:stopConnectorRequest>\n         <sys:templateName>uniform-service-active-out-connector</sys:templateName>\n         <sys:profileUuid>{{system_active}}</sys:profileUuid>\n      </sys:stopConnectorRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "Start OUT connector",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/xml",
										"type": "text"
									},
									{
										"key": "X-ForwardedUser",
										"value": "{{adminLogin}}",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:startConnectorRequest>\n         <sys:templateName>uniform-service-active-out-connector</sys:templateName>\n         <sys:profileUuid>{{system_active}}</sys:profileUuid>\n      </sys:startConnectorRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "clean esb",
					"item": [
						{
							"name": "Remove profile system_active",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "basic",
									"basic": [
										{
											"key": "password",
											"value": "admin",
											"type": "string"
										},
										{
											"key": "username",
											"value": "admin",
											"type": "string"
										}
									]
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"type": "text",
										"value": "application/xml"
									},
									{
										"key": "X-ForwardedUser",
										"type": "text",
										"value": "{{adminLogin}}"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:removeProfileRequest>\n         <sys:uuid>{{system_active}}</sys:uuid>\n      </sys:removeProfileRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						},
						{
							"name": "remove uniform-service-active-in-connector",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});",
											"",
											"pm.test(\"Body matches true\", function () {",
											"    pm.expect(pm.response.text()).to.include(\"true\");",
											"});",
											"",
											"function getSoapBody() {",
											"    var jsonObject = xml2Json(responseBody);",
											"    return jsonObject['soap:Envelope']['soap:Body'];",
											"}",
											"",
											"pm.test(\"Response is true\", function () {",
											"    var response = getSoapBody();",
											"    pm.expect(response.response._).to.eql('true');",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "basic",
									"basic": [
										{
											"key": "password",
											"value": "admin",
											"type": "string"
										},
										{
											"key": "username",
											"value": "admin",
											"type": "string"
										}
									]
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"type": "text",
										"value": "application/xml"
									},
									{
										"key": "X-ForwardedUser",
										"type": "text",
										"value": "{{adminLogin}}"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:sys=\"http://www.entaxy.ru/system-management-service/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n      <sys:removeConnectorRequest>\n         <sys:templateName>uniform-service-active-in-connector</sys:templateName>\n         <sys:profileUuid>{{system_active}}</sys:profileUuid>\n      </sys:removeConnectorRequest>\n   </soapenv:Body>\n</soapenv:Envelope>",
									"options": {
										"raw": {
											"language": "xml"
										}
									}
								},
								"url": {
									"raw": "{{base_url}}/system-management",
									"host": [
										"{{base_url}}"
									],
									"path": [
										"system-management"
									]
								}
							},
							"response": []
						}
					]
				}
			],
			"description": "для тестирования нужно добавть в environment: system1_id, system2_id",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			]
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	]
}