2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Modifications Copyright (c) 2019 Samsung
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.so.bpmn.vcpe.scripts
25 import com.github.tomakehurst.wiremock.junit.WireMockRule
26 import org.camunda.bpm.engine.delegate.BpmnError
27 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
29 import org.mockito.MockitoAnnotations
30 import org.onap.so.bpmn.core.RollbackData
32 import static com.github.tomakehurst.wiremock.client.WireMock.aResponse
33 import static com.github.tomakehurst.wiremock.client.WireMock.get
34 import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching
35 import static org.junit.Assert.assertTrue
36 import static org.mockito.Mockito.*
37 import static org.onap.so.bpmn.mock.StubResponseAAI.*
39 class DoCreateAllottedResourceBRGRollbackTest extends GroovyTestBase {
42 public WireMockRule wireMockRule = new WireMockRule(PORT)
44 String Prefix = "DCARBRGRB_"
45 String RbType = "DCARBRG_"
48 public static void setUpBeforeClass() {
49 GroovyTestBase.setUpBeforeClass()
54 MockitoAnnotations.initMocks(this)
57 public DoCreateAllottedResourceBRGRollbackTest() {
58 super("DoCreateAllottedResourceBRGRollback")
61 // ***** preProcessRequest *****
64 public void preProcessRequest() {
65 ExecutionEntity mex = setupMock()
68 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
69 DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
71 verify(mex).setVariable("prefix", Prefix)
72 verify(mex).setVariable("serviceInstanceId", "sii")
73 verify(mex).setVariable("parentServiceInstanceId", "psii")
74 verify(mex).setVariable("allottedResourceId", "myid")
75 verify(mex).setVariable("rollbackAAI", true)
76 verify(mex).setVariable("aaiARPath", "mypath")
77 verify(mex).setVariable("rollbackSDNC", true)
78 verify(mex).setVariable("deactivateSdnc", "myactivate")
79 verify(mex).setVariable("deleteSdnc", "mycreate")
80 verify(mex).setVariable("unassignSdnc", "true")
81 verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
82 verify(mex).setVariable("sdncDeleteRequest", "createreq")
83 verify(mex).setVariable("sdncUnassignRequest", "assignreq")
85 verify(mex, never()).setVariable("skipRollback", true)
89 public void preProcessRequest_RollbackDisabled() {
90 ExecutionEntity mex = setupMock()
93 when(mex.getVariable("disableRollback")).thenReturn("true")
95 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
96 DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
98 verify(mex).setVariable("prefix", Prefix)
99 verify(mex).setVariable("serviceInstanceId", "sii")
100 verify(mex).setVariable("parentServiceInstanceId", "psii")
101 verify(mex).setVariable("allottedResourceId", "myid")
102 verify(mex).setVariable("rollbackAAI", true)
103 verify(mex).setVariable("aaiARPath", "mypath")
104 verify(mex).setVariable("rollbackSDNC", true)
105 verify(mex).setVariable("deactivateSdnc", "myactivate")
106 verify(mex).setVariable("deleteSdnc", "mycreate")
107 verify(mex).setVariable("unassignSdnc", "true")
108 verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
109 verify(mex).setVariable("sdncDeleteRequest", "createreq")
110 verify(mex).setVariable("sdncUnassignRequest", "assignreq")
112 verify(mex).setVariable("skipRollback", true)
116 public void preProcessRequest_NoAAI() {
117 ExecutionEntity mex = setupMock()
118 def data = initPreProcess(mex)
120 when(mex.getVariable("rollbackAAI")).thenReturn(false)
121 data.put(RbType, "rollbackAAI", "false")
123 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
124 DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
126 verify(mex).setVariable("prefix", Prefix)
127 verify(mex).setVariable("serviceInstanceId", "sii")
128 verify(mex).setVariable("parentServiceInstanceId", "psii")
129 verify(mex).setVariable("allottedResourceId", "myid")
130 verify(mex, never()).setVariable("rollbackAAI", true)
131 verify(mex, never()).setVariable("aaiARPath", "mypath")
132 verify(mex).setVariable("rollbackSDNC", true)
133 verify(mex).setVariable("deactivateSdnc", "myactivate")
134 verify(mex).setVariable("deleteSdnc", "mycreate")
135 verify(mex).setVariable("unassignSdnc", "true")
136 verify(mex).setVariable("sdncDeactivateRequest", "activatereq")
137 verify(mex).setVariable("sdncDeleteRequest", "createreq")
138 verify(mex).setVariable("sdncUnassignRequest", "assignreq")
140 verify(mex, never()).setVariable("skipRollback", true)
144 public void preProcessRequest_NoAssign() {
145 ExecutionEntity mex = setupMock()
146 def data = initPreProcess(mex)
148 when(mex.getVariable("rollbackSDNC")).thenReturn(false)
149 data.put(RbType, "rollbackSDNCassign", "false")
151 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
152 DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
154 verify(mex).setVariable("prefix", Prefix)
155 verify(mex).setVariable("serviceInstanceId", "sii")
156 verify(mex).setVariable("parentServiceInstanceId", "psii")
157 verify(mex).setVariable("allottedResourceId", "myid")
158 verify(mex).setVariable("rollbackAAI", true)
159 verify(mex).setVariable("aaiARPath", "mypath")
160 verify(mex, never()).setVariable("rollbackSDNC", true)
161 verify(mex, never()).setVariable("deactivateSdnc", "myactivate")
162 verify(mex, never()).setVariable("deleteSdnc", "mycreate")
163 verify(mex, never()).setVariable("unassignSdnc", "true")
164 verify(mex, never()).setVariable("sdncDeactivateRequest", "activatereq")
165 verify(mex, never()).setVariable("sdncDeleteRequest", "createreq")
166 verify(mex, never()).setVariable("sdncUnassignRequest", "assignreq")
168 verify(mex, never()).setVariable("skipRollback", true)
172 public void preProcessRequest_NoAAI_NoAssign() {
173 ExecutionEntity mex = setupMock()
176 when(mex.getVariable("rollbackAAI")).thenReturn(false)
177 when(mex.getVariable("rollbackSDNC")).thenReturn(false)
179 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
180 DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
182 verify(mex).setVariable("skipRollback", true)
186 public void preProcessRequest_NoRbStructure() {
187 ExecutionEntity mex = setupMock()
190 when(mex.getVariable("rollbackData")).thenReturn(new RollbackData())
192 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
193 DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
195 verify(mex).setVariable("skipRollback", true)
199 public void preProcessRequest_NullRb() {
200 ExecutionEntity mex = setupMock()
203 when(mex.getVariable("rollbackData")).thenReturn(null)
205 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
206 DoCreateAllottedResourceBRGRollback.preProcessRequest(mex)
208 verify(mex).setVariable("skipRollback", true)
212 public void preProcessRequest_BpmnError() {
213 ExecutionEntity mex = setupMock()
216 when(mex.getVariable("rollbackData")).thenThrow(new BpmnError("expected exception"))
218 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
220 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.preProcessRequest(mex) }))
224 public void preProcessRequest_Ex() {
225 ExecutionEntity mex = setupMock()
228 when(mex.getVariable("rollbackData")).thenThrow(new RuntimeException("expected exception"))
230 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
232 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.preProcessRequest(mex) }))
237 public void updateAaiAROrchStatus() {
238 ExecutionEntity mex = setupMock()
239 initUpdateAaiAROrchStatus(mex)
241 MockGetAllottedResource(wireMockRule, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
242 MockPatchAllottedResource(wireMockRule, CUST, SVC, INST, ARID)
244 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
245 DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success")
249 public void updateAaiAROrchStatus_EmptyResponse() {
250 ExecutionEntity mex = setupMock()
251 initUpdateAaiAROrchStatus(mex)
254 .stubFor(get(urlMatching("/aai/v[0-9]+/.*"))
255 .willReturn(aResponse()
258 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
260 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success") }))
264 public void updateAaiAROrchStatus_NoArPath() {
265 ExecutionEntity mex = setupMock()
266 initUpdateAaiAROrchStatus(mex)
268 MockGetAllottedResource(wireMockRule, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
269 MockPatchAllottedResource(wireMockRule, CUST, SVC, INST, ARID)
271 when(mex.getVariable("aaiARPath")).thenReturn(null)
273 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
275 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.updateAaiAROrchStatus(mex, "success") }))
278 // ***** validateSDNCResp *****
281 public void validateSDNCResp() {
282 ExecutionEntity mex = setupMock()
283 initValidateSDNCResp(mex)
284 def resp = initValidateSDNCResp_Resp()
286 when(mex.getVariable(Prefix + "sdncResponseSuccess")).thenReturn(true)
288 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
290 DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create")
292 verify(mex).getVariable("WorkflowException")
293 verify(mex).getVariable("SDNCA_SuccessIndicator")
297 public void validateSDNCResp_Unsuccessful() {
298 ExecutionEntity mex = setupMock()
299 initValidateSDNCResp(mex)
300 def resp = initValidateSDNCResp_Resp()
302 when(mex.getVariable(Prefix + "sdncResponseSuccess")).thenReturn(false)
304 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
306 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
310 public void validateSDNCResp_BpmnError404() {
311 ExecutionEntity mex = setupMock()
312 initValidateSDNCResp(mex)
313 def resp = initValidateSDNCResp_Resp()
314 when(mex.getVariable(Prefix + "sdncResponseSuccess")).thenReturn(true)
316 when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("404", "expected exception"))
318 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
320 DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create")
324 public void validateSDNCResp_BpmnError() {
325 ExecutionEntity mex = setupMock()
326 initValidateSDNCResp(mex)
327 def resp = initValidateSDNCResp_Resp()
328 when(mex.getVariable(Prefix + "sdncResponseSuccess")).thenReturn(true)
330 when(mex.getVariable("WorkflowException")).thenThrow(new BpmnError("expected exception"))
332 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
334 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
338 public void validateSDNCResp_Ex() {
339 ExecutionEntity mex = setupMock()
340 initValidateSDNCResp(mex)
341 def resp = initValidateSDNCResp_Resp()
342 when(mex.getVariable(Prefix + "sdncResponseSuccess")).thenReturn(true)
344 when(mex.getVariable("WorkflowException")).thenThrow(new RuntimeException("expected exception"))
346 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
348 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.validateSDNCResp(mex, resp, "create") }))
353 public void deleteAaiAR() {
354 ExecutionEntity mex = setupMock()
357 MockGetAllottedResource(wireMockRule, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
358 MockDeleteAllottedResource(wireMockRule, CUST, SVC, INST, ARID, VERS)
360 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
361 DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex)
365 public void deleteAaiAR_NoArPath() {
366 ExecutionEntity mex = setupMock()
369 MockGetAllottedResource(wireMockRule, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
370 MockDeleteAllottedResource(wireMockRule, CUST, SVC, INST, ARID, VERS)
372 when(mex.getVariable("aaiARPath")).thenReturn("")
374 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
376 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
380 public void deleteAaiAR_BpmnError() {
381 ExecutionEntity mex = setupMock()
384 MockGetAllottedResource(wireMockRule, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
385 MockDeleteAllottedResource(wireMockRule, CUST, SVC, INST, ARID, VERS)
387 when(mex.getVariable("aaiARPath")).thenThrow(new BpmnError("expected exception"))
389 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
391 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
395 public void deleteAaiAR_Ex() {
396 ExecutionEntity mex = setupMock()
399 MockGetAllottedResource(wireMockRule, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml")
400 MockDeleteAllottedResource(wireMockRule, CUST, SVC, INST, ARID, VERS)
402 when(mex.getVariable("aaiARPath")).thenThrow(new RuntimeException("expected exception"))
404 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
406 assertTrue(doBpmnError({ _ -> DoCreateAllottedResourceBRGRollback.deleteAaiAR(mex) }))
410 public void postProcessRequest() {
411 ExecutionEntity mex = setupMock()
412 initPostProcessRequest(mex)
414 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
415 DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
417 verify(mex).setVariable("rollbackData", null)
418 verify(mex).setVariable("rolledBack", true)
422 public void postProcessRequest_RolledBack() {
423 ExecutionEntity mex = setupMock()
424 initPostProcessRequest(mex)
426 when(mex.getVariable("skipRollback")).thenReturn(true)
428 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
429 DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
431 verify(mex).setVariable("rollbackData", null)
432 verify(mex, never()).setVariable("rolledBack", true)
436 public void postProcessRequest_BpmnError() {
437 ExecutionEntity mex = setupMock()
438 initPostProcessRequest(mex)
440 when(mex.getVariable("skipRollback")).thenThrow(new BpmnError("expected exception"))
442 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
443 DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
445 verify(mex).setVariable("rollbackData", null)
446 verify(mex, never()).setVariable("rolledBack", true)
450 public void postProcessRequest_Ex() {
451 ExecutionEntity mex = setupMock()
452 initPostProcessRequest(mex)
454 when(mex.getVariable("skipRollback")).thenThrow(new RuntimeException("expected exception"))
456 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
457 DoCreateAllottedResourceBRGRollback.postProcessRequest(mex)
459 verify(mex).setVariable("rollbackData", null)
460 verify(mex, never()).setVariable("rolledBack", true)
464 public void processRollbackException() {
465 ExecutionEntity mex = setupMock()
466 initProcessRollbackException(mex)
468 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
469 DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
471 verify(mex).setVariable("rollbackData", null)
472 verify(mex).setVariable("rolledBack", false)
473 verify(mex).setVariable("rollbackError", "Caught exception in AllottedResource Create Rollback")
474 verify(mex).setVariable("WorkflowException", null)
478 public void processRollbackException_BpmnError() {
479 ExecutionEntity mex = setupMock()
480 initProcessRollbackException(mex)
482 doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
484 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
485 DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
489 public void processRollbackException_Ex() {
490 ExecutionEntity mex = setupMock()
491 initProcessRollbackException(mex)
493 doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
495 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
496 DoCreateAllottedResourceBRGRollback.processRollbackException(mex)
500 public void processRollbackJavaException() {
501 ExecutionEntity mex = setupMock()
502 initProcessRollbackException(mex)
504 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
505 DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
507 verify(mex).setVariable("rollbackData", null)
508 verify(mex).setVariable("rolledBack", false)
509 verify(mex).setVariable("rollbackError", "Caught Java exception in AllottedResource Create Rollback")
510 verify(mex, never()).setVariable("WorkflowException", null)
514 public void processRollbackJavaException_BpmnError() {
515 ExecutionEntity mex = setupMock()
516 initProcessRollbackException(mex)
518 doThrow(new BpmnError("expected exception")).when(mex).setVariable("rollbackData", null)
520 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
521 DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
525 public void processRollbackJavaException_Ex() {
526 ExecutionEntity mex = setupMock()
527 initProcessRollbackException(mex)
529 doThrow(new RuntimeException("expected exception")).when(mex).setVariable("rollbackData", null)
531 DoCreateAllottedResourceBRGRollback DoCreateAllottedResourceBRGRollback = new DoCreateAllottedResourceBRGRollback()
532 DoCreateAllottedResourceBRGRollback.processRollbackJavaException(mex)
535 private RollbackData initPreProcess(ExecutionEntity mex) {
536 def data = new RollbackData()
538 when(mex.getVariable(DBGFLAG)).thenReturn("true")
539 when(mex.getVariable("rollbackData")).thenReturn(data)
540 when(mex.getVariable("rollbackAAI")).thenReturn(true)
541 when(mex.getVariable("rollbackSDNC")).thenReturn(true)
542 when(mex.getVariable("disableRollback")).thenReturn("false")
544 data.put("SERVICEINSTANCE", "allottedResourceId", "myid")
546 data.put(RbType, "serviceInstanceId", "sii")
547 data.put(RbType, "parentServiceInstanceId", "psii")
549 data.put(RbType, "rollbackAAI", "true")
550 data.put(RbType, "aaiARPath", "mypath")
552 data.put(RbType, "rollbackSDNCassign", "true")
553 data.put(RbType, "rollbackSDNCactivate", "myactivate")
554 data.put(RbType, "rollbackSDNCcreate", "mycreate")
555 data.put(RbType, "sdncActivateRollbackReq", "activatereq")
556 data.put(RbType, "sdncCreateRollbackReq", "createreq")
557 data.put(RbType, "sdncAssignRollbackReq", "assignreq")
562 private initUpdateAaiAROrchStatus(ExecutionEntity mex) {
563 when(mex.getVariable(DBGFLAG)).thenReturn("true")
564 when(mex.getVariable("aaiARPath")).thenReturn("/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST + "/allotted-resources/allotted-resource/" + ARID)
565 when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
568 private initValidateSDNCResp(ExecutionEntity mex) {
569 when(mex.getVariable(DBGFLAG)).thenReturn("true")
570 when(mex.getVariable("prefix")).thenReturn(Prefix)
571 when(mex.getVariable("SDNCA_SuccessIndicator")).thenReturn(true)
574 private String initValidateSDNCResp_Resp() {
575 return "<response-data><response-code>200</response-code></response-data>"
578 private initDeleteAaiAR(ExecutionEntity mex) {
579 when(mex.getVariable(DBGFLAG)).thenReturn("true")
580 when(mex.getVariable("aaiARResourceVersion")).thenReturn(VERS)
581 when(mex.getVariable("aaiARPath")).thenReturn("/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST + "/allotted-resources/allotted-resource/" + ARID)
582 when(mex.getVariable("aai.endpoint")).thenReturn(aaiUriPfx)
585 private initPostProcessRequest(ExecutionEntity mex) {
586 when(mex.getVariable(DBGFLAG)).thenReturn("true")
587 when(mex.getVariable("skipRollback")).thenReturn(false)
590 private initProcessRollbackException(ExecutionEntity mex) {
591 when(mex.getVariable(DBGFLAG)).thenReturn("true")
594 private initProcessRollbackJavaException(ExecutionEntity mex) {
595 when(mex.getVariable(DBGFLAG)).thenReturn("true")