2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 package org.openecomp.mso.bpmn.vcpe.scripts
23 import org.camunda.bpm.engine.ProcessEngineServices
24 import org.camunda.bpm.engine.RepositoryService
25 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
26 import org.camunda.bpm.engine.repository.ProcessDefinition
27 import org.camunda.bpm.engine.runtime.Execution
28 import org.junit.Before
29 import org.junit.BeforeClass
32 import org.junit.Ignore
33 import org.mockito.MockitoAnnotations
34 import org.camunda.bpm.engine.delegate.BpmnError
35 import org.openecomp.mso.bpmn.core.WorkflowException
36 import org.openecomp.mso.bpmn.mock.FileUtil
38 import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
39 import static com.github.tomakehurst.wiremock.client.WireMock.delete
40 import static com.github.tomakehurst.wiremock.client.WireMock.get
41 import static com.github.tomakehurst.wiremock.client.WireMock.patch
42 import static com.github.tomakehurst.wiremock.client.WireMock.put
43 import static com.github.tomakehurst.wiremock.client.WireMock.stubFor
44 import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
45 import static org.junit.Assert.*;
46 import static org.mockito.Mockito.*
47 import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource
48 import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockGetAllottedResource
49 import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockPatchAllottedResource
50 import static org.openecomp.mso.bpmn.mock.StubResponseAAI.MockQueryAllottedResourceById
54 import org.openecomp.mso.bpmn.core.RollbackData
55 import org.openecomp.mso.bpmn.vcpe.scripts.MapSetter
57 import com.github.tomakehurst.wiremock.junit.WireMockRule
59 class DoDeleteAllottedResourceTXCTest extends GroovyTestBase {
62 public WireMockRule wireMockRule = new WireMockRule(PORT)
64 String Prefix = "DDARTXC_"
67 public static void setUpBeforeClass() {
68 super.setUpBeforeClass()
74 MockitoAnnotations.initMocks(this)
77 public DoDeleteAllottedResourceTXCTest() {
78 super("DoDeleteAllottedResourceTXC")
82 // ***** preProcessRequest *****
86 public void preProcessRequest() {
87 ExecutionEntity mex = setupMock()
90 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
91 DoDeleteAllottedResourceTXC.preProcessRequest(mex)
93 verify(mex).getVariable(DBGFLAG)
94 verify(mex).setVariable("prefix", Prefix)
95 verify(mex).setVariable("sdncCallbackUrl", "sdncurn")
97 assertTrue(checkMissingPreProcessRequest("URN_mso_workflow_sdncadapter_callback"))
98 assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
99 assertTrue(checkMissingPreProcessRequest("allottedResourceId"))
104 public void preProcessRequest_BpmnError() {
105 ExecutionEntity mex = setupMock()
108 when(mex.getVariable("serviceInstanceId")).thenThrow(new BpmnError("expected exception"))
110 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
112 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) }))
117 public void preProcessRequest_Ex() {
118 ExecutionEntity mex = setupMock()
121 when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
123 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
125 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) }))
129 // ***** getAaiAR *****
133 public void getAaiAR() {
134 MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml")
135 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
137 ExecutionEntity mex = setupMock()
140 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
141 DoDeleteAllottedResourceTXC.getAaiAR(mex)
143 verify(mex).setVariable("parentServiceInstanceId", INST)
148 public void getAaiAR_EmptyResponse() {
150 // note: empty result-link
152 .stubFor(get(urlMatching("/aai/.*/search/.*"))
153 .willReturn(aResponse()
155 .withHeader("Content-Type", "text/xml")
156 .withBody("<result-data></result-data>")))
158 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
160 ExecutionEntity mex = setupMock()
163 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
165 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.getAaiAR(mex) }))
169 // ***** updateAaiAROrchStatus *****
173 public void updateAaiAROrchStatus() {
174 ExecutionEntity mex = setupMock()
175 initUpdateAaiAROrchStatus(mex)
177 MockPatchAllottedResource(CUST, SVC, INST, ARID)
179 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
180 DoDeleteAllottedResourceTXC.updateAaiAROrchStatus(mex, "success")
184 // ***** buildSDNCRequest *****
188 public void buildSDNCRequest() {
189 ExecutionEntity mex = setupMock()
190 initBuildSDNCRequest(mex)
192 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
194 String result = DoDeleteAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq")
196 assertTrue(result.indexOf("<sdncadapter:RequestId>myreq</") >= 0)
197 assertTrue(result.indexOf("<sdncadapter:SvcAction>myact</") >= 0)
198 assertTrue(result.indexOf("<allotted-resource-id>ari</") >= 0)
199 assertTrue(result.indexOf("<sdncadapter:SvcInstanceId>sii</") >= 0)
200 assertTrue(result.indexOf("<service-instance-id>psii</") >= 0)
201 assertTrue(result.indexOf("<parent-service-instance-id>psii</") >= 0)
202 assertTrue(result.indexOf("<sdncadapter:CallbackUrl>scu</") >= 0)
203 assertTrue(result.indexOf("<request-id>mri</") >= 0)
204 assertTrue(result.indexOf("<model-invariant-uuid/>") >= 0)
205 assertTrue(result.indexOf("<model-uuid/>") >= 0)
206 assertTrue(result.indexOf("<model-customization-uuid/>") >= 0)
207 assertTrue(result.indexOf("<model-version/>") >= 0)
208 assertTrue(result.indexOf("<model-name/>") >= 0)
213 public void buildSDNCRequest_Ex() {
214 ExecutionEntity mex = setupMock()
215 initBuildSDNCRequest(mex)
217 when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
219 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
221 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.buildSDNCRequest(mex, "myact", "myreq") }))
225 // ***** preProcessSDNCUnassign *****
229 public void preProcessSDNCUnassign() {
230 ExecutionEntity mex = setupMock()
231 def map = setupMap(mex)
232 initPreProcessSDNC(mex)
234 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
235 DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex)
237 def req = map.get("sdncUnassignRequest")
239 assertTrue(req.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
240 assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
241 assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
246 public void preProcessSDNCUnassign_BpmnError() {
247 ExecutionEntity mex = setupMock()
248 initPreProcessSDNC(mex)
250 when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
252 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
254 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex) }))
259 public void preProcessSDNCUnassign_Ex() {
260 ExecutionEntity mex = setupMock()
261 initPreProcessSDNC(mex)
263 when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
265 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
267 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCUnassign(mex) }))
271 // ***** preProcessSDNCDelete *****
275 public void preProcessSDNCDelete() {
276 ExecutionEntity mex = setupMock()
277 def map = setupMap(mex)
278 initPreProcessSDNC(mex)
280 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
281 DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex)
283 def req = map.get("sdncDeleteRequest")
285 assertTrue(req.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
286 assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
287 assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
292 public void preProcessSDNCDelete_BpmnError() {
293 ExecutionEntity mex = setupMock()
294 initPreProcessSDNC(mex)
296 when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
298 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
300 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex) }))
305 public void preProcessSDNCDelete_Ex() {
306 ExecutionEntity mex = setupMock()
307 initPreProcessSDNC(mex)
309 when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
311 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
313 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDelete(mex) }))
317 // ***** preProcessSDNCDeactivate *****
321 public void preProcessSDNCDeactivate() {
322 ExecutionEntity mex = setupMock()
323 def map = setupMap(mex)
324 initPreProcessSDNC(mex)
326 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
327 DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex)
329 def req = map.get("sdncDeactivateRequest")
331 assertTrue(req.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
332 assertTrue(req.indexOf("<request-action>DeleteTunnelXConnInstance</") >= 0)
333 assertTrue(req.indexOf("<sdncadapter:RequestId>") >= 0)
338 public void preProcessSDNCDeactivate_BpmnError() {
339 ExecutionEntity mex = setupMock()
340 initPreProcessSDNC(mex)
342 when(mex.getVariable("allottedResourceId")).thenThrow(new BpmnError("expected exception"))
344 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
346 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex) }))
351 public void preProcessSDNCDeactivate_Ex() {
352 ExecutionEntity mex = setupMock()
353 initPreProcessSDNC(mex)
355 when(mex.getVariable("allottedResourceId")).thenThrow(new RuntimeException("expected exception"))
357 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
359 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.preProcessSDNCDeactivate(mex) }))
363 // ***** validateSDNCResp *****
367 public void validateSDNCResp() {
368 ExecutionEntity mex = setupMock()
369 def data = initValidateSDNCResp(mex)
370 def resp = initValidateSDNCResp_Resp(200)
372 when(mex.getVariable(Prefix+"sdncResponseSuccess")).thenReturn(true)
374 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
376 DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create")
378 verify(mex).getVariable("WorkflowException")
379 verify(mex).getVariable("SDNCA_SuccessIndicator")
380 verify(mex).getVariable(Prefix+"sdncResponseSuccess")
382 verify(mex, never()).getVariable(Prefix + "sdncRequestDataResponseCode")
383 verify(mex, never()).setVariable("wasDeleted", false)
388 public void validateSDNCResp_Fail404_Deactivate_FailNotFound() {
389 ExecutionEntity mex = setupMock()
390 def data = initValidateSDNCResp(mex)
392 def resp = initValidateSDNCResp_Resp(404)
393 when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
394 when(mex.getVariable("failNotFound")).thenReturn("true")
396 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
398 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")}))
403 public void validateSDNCResp_Fail404_Deactivate() {
404 ExecutionEntity mex = setupMock()
405 def data = initValidateSDNCResp(mex)
407 def resp = initValidateSDNCResp_Resp(404)
408 when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
410 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
412 DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")
414 verify(mex).setVariable("ARNotFoundInSDNC", true)
415 verify(mex).setVariable("wasDeleted", false)
420 public void validateSDNCResp_Fail404() {
421 ExecutionEntity mex = setupMock()
422 def data = initValidateSDNCResp(mex)
424 def resp = initValidateSDNCResp_Resp(404)
425 when(mex.getVariable(Prefix+"sdncRequestDataResponseCode")).thenReturn("404")
427 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
429 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create")}))
434 public void validateSDNCResp_Deactivate() {
435 ExecutionEntity mex = setupMock()
436 def data = initValidateSDNCResp(mex)
437 def resp = initValidateSDNCResp_Resp(200)
439 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
441 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "deactivate")}))
446 public void validateSDNCResp_BpmnError() {
447 ExecutionEntity mex = setupMock()
448 initValidateSDNCResp(mex)
449 def resp = initValidateSDNCResp_Resp(200)
451 when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
453 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
455 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
460 public void validateSDNCResp_Ex() {
461 ExecutionEntity mex = setupMock()
462 initValidateSDNCResp(mex)
463 def resp = initValidateSDNCResp_Resp(200)
465 when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
467 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
469 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceTXC.validateSDNCResp(mex, resp, "create") }))
474 public void deleteAaiAR() {
475 ExecutionEntity mex = setupMock()
478 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
479 MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
481 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
482 DoDeleteAllottedResourceTXC.deleteAaiAR(mex)
487 public void deleteAaiAR_NoArPath() {
488 ExecutionEntity mex = setupMock()
491 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
492 MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
494 when(mex.getVariable("aaiARPath")).thenReturn("")
496 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
498 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
503 public void deleteAaiAR_BpmnError() {
504 ExecutionEntity mex = setupMock()
507 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
508 MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
510 when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
512 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
514 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
519 public void deleteAaiAR_Ex() {
520 ExecutionEntity mex = setupMock()
523 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml")
524 MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
526 when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
528 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
530 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceTXC.deleteAaiAR(mex) }))
533 private boolean checkMissingPreProcessRequest(String fieldnm) {
534 ExecutionEntity mex = setupMock()
537 DoDeleteAllottedResourceTXC DoDeleteAllottedResourceTXC = new DoDeleteAllottedResourceTXC()
539 when(mex.getVariable(fieldnm)).thenReturn("")
541 return doBpmnError( { _ -> DoDeleteAllottedResourceTXC.preProcessRequest(mex) })
544 private void initPreProcess(ExecutionEntity mex) {
545 when(mex.getVariable(DBGFLAG)).thenReturn("true")
546 when(mex.getVariable("URN_mso_workflow_sdncadapter_callback")).thenReturn("sdncurn")
547 when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
548 when(mex.getVariable("allottedResourceId")).thenReturn("ari")
551 private void initGetAaiAR(ExecutionEntity mex) {
552 when(mex.getVariable(DBGFLAG)).thenReturn("true")
553 when(mex.getVariable("allottedResourceType")).thenReturn("TXC")
554 when(mex.getVariable("allottedResourceRole")).thenReturn("TXC")
555 when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
556 when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoDeleteAllottedResourceTXC/getAR.xml"))
557 when(mex.getVariable("URN_mso_workflow_global_default_aai_namespace")).thenReturn(urnProps.get("mso.workflow.global.default.aai.namespace"))
558 when(mex.getVariable("URN_mso_workflow_global_default_aai_version")).thenReturn(urnProps.get("mso.workflow.global.default.aai.version"))
559 when(mex.getVariable("URN_mso_workflow_default_aai_v8_nodes_query_uri")).thenReturn(urnProps.get("mso.workflow.default.aai.v8.nodes-query.uri"))
560 when(mex.getVariable("URN_aai_endpoint")).thenReturn(aaiUriPfx)
561 when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
562 when(mex.getVariable("aaiAROrchStatus")).thenReturn("Active")
565 private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
566 when(mex.getVariable(DBGFLAG)).thenReturn("true")
567 when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
570 private initBuildSDNCRequest(ExecutionEntity mex) {
571 when(mex.getVariable(DBGFLAG)).thenReturn("true")
572 when(mex.getVariable("allottedResourceId")).thenReturn("ari")
573 when(mex.getVariable("serviceInstanceId")).thenReturn("sii")
574 when(mex.getVariable("parentServiceInstanceId")).thenReturn("psii")
575 when(mex.getVariable("sdncCallbackUrl")).thenReturn("scu")
576 when(mex.getVariable("msoRequestId")).thenReturn("mri")
579 private initPreProcessSDNC(ExecutionEntity mex) {
580 when(mex.getVariable(DBGFLAG)).thenReturn("true")
583 private initValidateSDNCResp(ExecutionEntity mex) {
584 when(mex.getVariable(DBGFLAG)).thenReturn("true")
585 when(mex.getVariable("prefix")).thenReturn(Prefix)
586 when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
589 private String initValidateSDNCResp_Resp(int code) {
590 return "<response-data><response-code>${code}</response-code></response-data>"
593 private initDeleteAaiAR(ExecutionEntity mex) {
594 when(mex.getVariable(DBGFLAG)).thenReturn("true")
595 when(mex.getVariable("aaiARPath")).thenReturn(aaiUriPfx + "/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID)
596 when(mex.getVariable("aaiARResourceVersion")).thenReturn("myvers")
597 when(mex.getVariable("URN_aai_endpoint")).thenReturn(aaiUriPfx)