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
\r
24 import org.camunda.bpm.engine.RepositoryService
\r
25 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
\r
26 import org.camunda.bpm.engine.repository.ProcessDefinition
\r
27 import org.camunda.bpm.engine.runtime.Execution
\r
28 import org.junit.Before
29 import org.junit.BeforeClass
\r
30 import org.junit.Rule
\r
32 import org.junit.Ignore
\r
33 import org.mockito.MockitoAnnotations
34 import org.camunda.bpm.engine.delegate.BpmnError
\r
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.*;
\r
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
\r
59 class DoDeleteAllottedResourceBRGTest extends GroovyTestBase {
\r
62 public WireMockRule wireMockRule = new WireMockRule(PORT)
64 String Prefix = "DDARBRG_"
\r
67 public static void setUpBeforeClass() {
68 super.setUpBeforeClass()
74 MockitoAnnotations.initMocks(this)
\r
77 public DoDeleteAllottedResourceBRGTest() {
78 super("DoDeleteAllottedResourceBRG")
82 // ***** preProcessRequest *****
\r
86 public void preProcessRequest() {
\r
87 ExecutionEntity mex = setupMock()
90 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
\r
91 DoDeleteAllottedResourceBRG.preProcessRequest(mex)
\r
93 verify(mex).getVariable(DBGFLAG)
\r
94 verify(mex).setVariable("prefix", Prefix)
95 verify(mex).setVariable("sdncCallbackUrl", "sdncurn")
\r
97 assertTrue(checkMissingPreProcessRequest("URN_mso_workflow_sdncadapter_callback"))
98 assertTrue(checkMissingPreProcessRequest("serviceInstanceId"))
99 assertTrue(checkMissingPreProcessRequest("allottedResourceId"))
\r
104 public void preProcessRequest_BpmnError() {
105 ExecutionEntity mex = setupMock()
108 when(mex.getVariable("serviceInstanceId")).thenThrow(new BpmnError("expected exception"))
110 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
112 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.preProcessRequest(mex) }))
117 public void preProcessRequest_Ex() {
118 ExecutionEntity mex = setupMock()
121 when(mex.getVariable("serviceInstanceId")).thenThrow(new RuntimeException("expected exception"))
123 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
125 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.preProcessRequest(mex) }))
129 // ***** getAaiAR *****
133 public void getAaiAR() {
134 MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml")
135 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
137 ExecutionEntity mex = setupMock()
140 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
141 DoDeleteAllottedResourceBRG.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/DoDeleteAllottedResourceBRG/arGetById.xml")
160 ExecutionEntity mex = setupMock()
163 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
165 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.getAaiAR(mex) }))
169 // ***** updateAaiAROrchStatus *****
173 public void updateAaiAROrchStatus() {
174 ExecutionEntity mex = setupMock()
175 initUpdateAaiAROrchStatus(mex)
177 MockPatchAllottedResource(CUST, SVC, INST, ARID)
179 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
180 DoDeleteAllottedResourceBRG.updateAaiAROrchStatus(mex, "success")
184 // ***** buildSDNCRequest *****
188 public void buildSDNCRequest() {
189 ExecutionEntity mex = setupMock()
190 initBuildSDNCRequest(mex)
192 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
194 String result = DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
221 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.buildSDNCRequest(mex, "myact", "myreq") }))
225 // ***** preProcessSDNCUnassign *****
229 public void preProcessSDNCUnassign() {
230 ExecutionEntity mex = setupMock()
231 def map = setupMap(mex)
232 initPreProcessSDNC(mex)
234 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
235 DoDeleteAllottedResourceBRG.preProcessSDNCUnassign(mex)
237 def req = map.get("sdncUnassignRequest")
239 assertTrue(req.indexOf("<sdncadapter:SvcAction>unassign</") >= 0)
240 assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
254 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
267 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCUnassign(mex) }))
271 // ***** preProcessSDNCDelete *****
275 public void preProcessSDNCDelete() {
276 ExecutionEntity mex = setupMock()
277 def map = setupMap(mex)
278 initPreProcessSDNC(mex)
280 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
281 DoDeleteAllottedResourceBRG.preProcessSDNCDelete(mex)
283 def req = map.get("sdncDeleteRequest")
285 assertTrue(req.indexOf("<sdncadapter:SvcAction>delete</") >= 0)
286 assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
300 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
313 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.preProcessSDNCDelete(mex) }))
317 // ***** preProcessSDNCDeactivate *****
321 public void preProcessSDNCDeactivate() {
322 ExecutionEntity mex = setupMock()
323 def map = setupMap(mex)
324 initPreProcessSDNC(mex)
326 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
327 DoDeleteAllottedResourceBRG.preProcessSDNCDeactivate(mex)
329 def req = map.get("sdncDeactivateRequest")
331 assertTrue(req.indexOf("<sdncadapter:SvcAction>deactivate</") >= 0)
332 assertTrue(req.indexOf("<request-action>DeleteBRGInstance</") >= 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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
346 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
359 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
376 DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
398 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
412 DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
429 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
441 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
455 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.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 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
469 assertTrue(doBpmnError({ _ -> DoDeleteAllottedResourceBRG.validateSDNCResp(mex, resp, "create") }))
474 public void deleteAaiAR() {
475 ExecutionEntity mex = setupMock()
478 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
479 MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
481 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
482 DoDeleteAllottedResourceBRG.deleteAaiAR(mex)
487 public void deleteAaiAR_NoArPath() {
488 ExecutionEntity mex = setupMock()
491 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
492 MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
494 when(mex.getVariable("aaiARPath")).thenReturn("")
496 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
498 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
503 public void deleteAaiAR_BpmnError() {
504 ExecutionEntity mex = setupMock()
507 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
508 MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
510 when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
512 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
514 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
519 public void deleteAaiAR_Ex() {
520 ExecutionEntity mex = setupMock()
523 MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml")
524 MockDeleteAllottedResource(CUST, SVC, INST, ARID, VERS)
526 when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
528 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
530 assertTrue(doBpmnError( { _ -> DoDeleteAllottedResourceBRG.deleteAaiAR(mex) }))
533 private boolean checkMissingPreProcessRequest(String fieldnm) {
534 ExecutionEntity mex = setupMock()
537 DoDeleteAllottedResourceBRG DoDeleteAllottedResourceBRG = new DoDeleteAllottedResourceBRG()
539 when(mex.getVariable(fieldnm)).thenReturn("")
541 return doBpmnError( { _ -> DoDeleteAllottedResourceBRG.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("BRG")
554 when(mex.getVariable("allottedResourceRole")).thenReturn("BRG")
555 when(mex.getVariable("allottedResourceId")).thenReturn(ARID)
556 when(mex.getVariable("CSI_service")).thenReturn(FileUtil.readResourceFile("__files/VCPE/DoDeleteAllottedResourceBRG/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)