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=========================================================
21 package org.onap.so.bpmn.common.scripts
24 import static org.mockito.Mockito.*
25 import org.camunda.bpm.engine.ProcessEngineServices
26 import org.camunda.bpm.engine.RepositoryService
27 import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity
28 import org.camunda.bpm.engine.repository.ProcessDefinition
29 import org.junit.Before
31 import org.junit.runner.RunWith
32 import org.mockito.MockitoAnnotations
33 import org.mockito.junit.MockitoJUnitRunner;
34 import org.mockito.internal.debugging.MockitoDebuggerImpl
35 import org.onap.so.bpmn.common.scripts.SDNCAdapter;
37 import org.onap.so.bpmn.mock.FileUtil
39 @RunWith(MockitoJUnitRunner.Silent.class)
40 public class SDNCAdapterTest {
45 MockitoAnnotations.initMocks(this)
46 System.setProperty("jboss.qualified.host.name","myhost.com")
50 String workflowResponse = """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns="com:att:sdnctl:l3api"
51 xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
52 xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
53 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
54 <sdncadapterworkflow:response-data>
56 <tag0:RequestId>testRequestId</tag0:RequestId>
57 <tag0:ResponseCode>200</tag0:ResponseCode>
58 <tag0:ResponseMessage>OK</tag0:ResponseMessage>
59 </tag0:CallbackHeader>
60 <tag0:RequestData xsi:type="xs:string">
62 <service-instance-id>FK/VLXM/003717//SW_INTERNET</service-instance-id>
64 <rpc-name>service-configuration-operation</rpc-name>
65 <rpc-action>activate</rpc-action>
66 <request-status>synccomplete</request-status>
67 <final-indicator>N</final-indicator>
68 <l3sdn-action>Layer3ServiceActivateRequest</l3sdn-action>
69 <l3sdn-subaction>SUPP</l3sdn-subaction>
70 <response-timestamp>2015-04-28T21:32:11.386Z</response-timestamp>
73 <internet-evc-access-information>
74 <ip-version>ds</ip-version>
75 <internet-evc-speed-value>8</internet-evc-speed-value>
76 <internet-evc-speed-units>Mbps</internet-evc-speed-units>
77 </internet-evc-access-information>
82 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
83 <v6-static-route-prefix>2001:1890:12e3:2da::</v6-static-route-prefix>
84 <v6-static-route-prefix-length>28</v6-static-route-prefix-length>
87 <v4-static-route-prefix>255.255.252.1</v4-static-route-prefix>
88 <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
89 <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
92 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
93 <v6-static-route-prefix>2001:1890:12e3:2da::</v6-static-route-prefix>
94 <v6-static-route-prefix-length>28</v6-static-route-prefix-length>
97 <v4-static-route-prefix>255.255.252.2</v4-static-route-prefix>
98 <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
99 <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
102 <v4-static-route-prefix>255.255.252.3</v4-static-route-prefix>
103 <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
104 <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
108 <v6-dhcp-server-enabled>N</v6-dhcp-server-enabled>
109 <v4-dhcp-server-enabled>Y</v4-dhcp-server-enabled>
110 <use-v6-default-pool>N</use-v6-default-pool>
111 <excluded-v4-dhcp-addresses-from-default-pool>
112 <excluded-v4-address>192.168.1.7</excluded-v4-address>
113 </excluded-v4-dhcp-addresses-from-default-pool>
114 <excluded-v4-dhcp-addresses-from-default-pool>
115 <excluded-v4-address>192.168.1.8</excluded-v4-address>
116 </excluded-v4-dhcp-addresses-from-default-pool>
118 <v4-dhcp-relay-next-hop-address>1.1.1.1</v4-dhcp-relay-next-hop-address>
119 <v4-dhcp-pool-prefix-length>28</v4-dhcp-pool-prefix-length>
120 <excluded-v4-addresses>
121 <excluded-v4-address>192.168.1.5</excluded-v4-address>
122 </excluded-v4-addresses>
123 <v4-dhcp-relay-gateway-address>2.2.2.1</v4-dhcp-relay-gateway-address>
124 <excluded-v4-addresses>
125 <excluded-v4-address>192.168.1.6</excluded-v4-address>
126 </excluded-v4-addresses>
127 <v4-dhcp-pool-prefix>192.155.2.3</v4-dhcp-pool-prefix>
130 <v4-dhcp-relay-next-hop-address>1.1.1.2</v4-dhcp-relay-next-hop-address>
131 <v4-dhcp-pool-prefix-length>28</v4-dhcp-pool-prefix-length>
132 <excluded-v4-addresses>
133 <excluded-v4-address>192.168.1.6</excluded-v4-address>
134 </excluded-v4-addresses>
135 <v4-dhcp-relay-gateway-address>2.2.2.2</v4-dhcp-relay-gateway-address>
136 <excluded-v4-addresses>
137 <excluded-v4-address>192.168.1.7</excluded-v4-address>
138 </excluded-v4-addresses>
139 <v4-dhcp-pool-prefix>192.155.2.4</v4-dhcp-pool-prefix>
141 <use-v4-default-pool>Y</use-v4-default-pool>
142 <excluded-v6-dhcp-addresses-from-default-pool>
143 <excluded-v6-address>1:5</excluded-v6-address>
144 </excluded-v6-dhcp-addresses-from-default-pool>
145 <excluded-v6-dhcp-addresses-from-default-pool>
146 <excluded-v6-address>1:6</excluded-v6-address>
147 </excluded-v6-dhcp-addresses-from-default-pool>
149 <v6-dhcp-relay-next-hop-address>4:4</v6-dhcp-relay-next-hop-address>
150 <v6-dhcp-pool-prefix-length>28</v6-dhcp-pool-prefix-length>
151 <excluded-v6-addresses>
152 <excluded-v6-address>1:1</excluded-v6-address>
153 </excluded-v6-addresses>
154 <v6-dhcp-relay-gateway-address>3:3</v6-dhcp-relay-gateway-address>
155 <excluded-v6-addresses>
156 <excluded-v6-address>2:2</excluded-v6-address>
157 </excluded-v6-addresses>
158 <v6-dhcp-pool-prefix>0:0</v6-dhcp-pool-prefix>
161 <v6-dhcp-relay-next-hop-address>4:4</v6-dhcp-relay-next-hop-address>
162 <v6-dhcp-pool-prefix-length>28</v6-dhcp-pool-prefix-length>
163 <excluded-v6-addresses>
164 <excluded-v6-address>1:1</excluded-v6-address>
165 </excluded-v6-addresses>
166 <v6-dhcp-relay-gateway-address>3:3</v6-dhcp-relay-gateway-address>
167 <excluded-v6-addresses>
168 <excluded-v6-address>2:2</excluded-v6-address>
169 </excluded-v6-addresses>
170 <v6-dhcp-pool-prefix>0:0</v6-dhcp-pool-prefix>
174 <stateful-firewall-lite-v6-enabled>N</stateful-firewall-lite-v6-enabled>
175 <stateful-firewall-lite-v4-enabled>Y</stateful-firewall-lite-v4-enabled>
176 <v4-firewall-packet-filters>
177 <v4-firewall-prefix>0.0.0.1</v4-firewall-prefix>
178 <v4-firewall-prefix-length>1</v4-firewall-prefix-length>
179 <allow-icmp-ping>Y</allow-icmp-ping>
181 <port-number>1</port-number>
184 <port-number>1</port-number>
186 </v4-firewall-packet-filters>
187 <v4-firewall-packet-filters>
188 <v4-firewall-prefix>0.0.0.2</v4-firewall-prefix>
189 <v4-firewall-prefix-length>2</v4-firewall-prefix-length>
190 <allow-icmp-ping>Y</allow-icmp-ping>
192 <port-number>2</port-number>
195 <port-number>2</port-number>
197 </v4-firewall-packet-filters>
198 <v6-firewall-packet-filters>
199 <v6-firewall-prefix>:</v6-firewall-prefix>
200 <v6-firewall-prefix-length>0</v6-firewall-prefix-length>
201 <allow-icmp-ping>Y</allow-icmp-ping>
203 <port-number>3</port-number>
206 <port-number>3</port-number>
208 </v6-firewall-packet-filters>
209 <v6-firewall-packet-filters>
210 <v6-firewall-prefix>:</v6-firewall-prefix>
211 <v6-firewall-prefix-length>1</v6-firewall-prefix-length>
212 <allow-icmp-ping>Y</allow-icmp-ping>
214 <port-number>4</port-number>
217 <port-number>4</port-number>
219 </v6-firewall-packet-filters>
223 <v4-pat-pool-prefix>192.168.1.44</v4-pat-pool-prefix>
224 <v4-pat-pool-next-hop-address>192.168.1.5</v4-pat-pool-next-hop-address>
225 <v4-pat-pool-prefix-length>0</v4-pat-pool-prefix-length>
227 <use-v4-default-pool>Y</use-v4-default-pool>
228 <v4-pat-enabled>N</v4-pat-enabled>
230 <v4-pat-pool-prefix>192.168.1.45</v4-pat-pool-prefix>
231 <v4-pat-pool-next-hop-address>192.168.1.6</v4-pat-pool-next-hop-address>
232 <v4-pat-pool-prefix-length>28</v4-pat-pool-prefix-length>
236 <v4-nat-enabled>Y</v4-nat-enabled>
237 <v4-nat-mapping-entries>
238 <v4-nat-internal>0.0.0.0</v4-nat-internal>
239 <v4-nat-next-hop-address>0.0.0.0</v4-nat-next-hop-address>
240 <v4-nat-external>0.0.0.0</v4-nat-external>
241 </v4-nat-mapping-entries>
242 <v4-nat-mapping-entries>
243 <v4-nat-internal>0.0.0.1</v4-nat-internal>
244 <v4-nat-next-hop-address>0.0.0.1</v4-nat-next-hop-address>
245 <v4-nat-external>0.0.0.1</v4-nat-external>
246 </v4-nat-mapping-entries>
248 <vr-designation>primary</vr-designation>
249 <v4-vce-loopback-address>162.200.3.144</v4-vce-loopback-address>
250 <v6-vr-lan-prefix-length>64</v6-vr-lan-prefix-length>
251 <v6-vce-wan-address>2001:1890:12e3:2da::</v6-vce-wan-address>
252 <v6-vr-lan-prefix>2620:0:10d0:f:ffff:ffff:ffff:fffe</v6-vr-lan-prefix>
253 <v4-vr-lan-prefix-length>24</v4-vr-lan-prefix-length>
254 <v4-vr-lan-prefix>10.192.27.254</v4-vr-lan-prefix>
255 <v4-public-lan-prefixes>
256 <t-provided-v4-lan-public-prefixes>
257 <request-index>1</request-index>
258 <v4-next-hop-address>192.168.1.2</v4-next-hop-address>
259 <v4-lan-public-prefix>192.168.1.1</v4-lan-public-prefix>
260 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
261 </t-provided-v4-lan-public-prefixes>
262 <t-provided-v4-lan-public-prefixes>
263 <request-index>1</request-index>
264 <v4-next-hop-address>192.168.1.72</v4-next-hop-address>
265 <v4-lan-public-prefix>192.168.1.71</v4-lan-public-prefix>
266 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
267 </t-provided-v4-lan-public-prefixes>
268 <t-provided-v4-lan-public-prefixes>
269 <request-index>1</request-index>
270 <v4-next-hop-address>192.168.1.68</v4-next-hop-address>
271 <v4-lan-public-prefix>192.168.1.67</v4-lan-public-prefix>
272 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
273 </t-provided-v4-lan-public-prefixes>
274 </v4-public-lan-prefixes>
275 <v6-public-lan-prefixes>
276 <t-provided-v6-lan-public-prefixes>
277 <request-index>1</request-index>
278 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
279 <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
280 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
281 </t-provided-v6-lan-public-prefixes>
282 <t-provided-v6-lan-public-prefixes>
283 <request-index>1</request-index>
284 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
285 <v6-lan-public-prefix>2001:1890:12e3:3da::</v6-lan-public-prefix>
286 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
287 </t-provided-v6-lan-public-prefixes>
288 <t-provided-v6-lan-public-prefixes>
289 <request-index>1</request-index>
290 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
291 <v6-lan-public-prefix>2001:1890:12e3:4da::</v6-lan-public-prefix>
292 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
293 </t-provided-v6-lan-public-prefixes>
294 </v6-public-lan-prefixes>
296 <routing-protocol>none</routing-protocol>
298 <ucpe-vms-service-information>
299 <transport-service-information>
300 <transport-service-type>AVPN</transport-service-type>
301 <access-circuit-info>
302 <access-circuit-id>1</access-circuit-id>
303 <dual-mode>Active</dual-mode>
304 </access-circuit-info>
305 <access-circuit-info>
306 <access-circuit-id>2</access-circuit-id>
307 <dual-mode>Standby</dual-mode>
308 </access-circuit-info>
309 </transport-service-information>
311 <ucpe-host-name>hostname</ucpe-host-name>
312 <ucpe-activation-code>activecode</ucpe-activation-code>
313 <out-of-band-management-modem>OOB</out-of-band-management-modem>
317 <vnf-instance-id>1</vnf-instance-id>
318 <vnf-sequence-number>1</vnf-sequence-number>
319 <vnf-type>ZZ</vnf-type>
320 <vnf-vendor>JUNIPER</vnf-vendor>
321 <vnf-model>MODEL1</vnf-model>
323 <prov-status>1</prov-status>
324 <operational-state>1</operational-state>
325 <orchestration-status>1</orchestration-status>
326 <equipment-role>1</equipment-role>
329 <vnf-instance-id>2</vnf-instance-id>
330 <vnf-sequence-number>2</vnf-sequence-number>
331 <vnf-type>HY</vnf-type>
332 <vnf-vendor>JUNIPER</vnf-vendor>
333 <vnf-model>MODEL2</vnf-model>
335 <prov-status>2</prov-status>
336 <operational-state>2</operational-state>
337 <orchestration-status>2</orchestration-status>
338 <equipment-role>2</equipment-role>
341 </ucpe-vms-service-information>
342 <request-information>
343 <request-action>Layer3ServiceActivateRequest</request-action>
344 <order-number>4281555</order-number>
345 <request-id>155415ab-b4a7-4382-b4c6-d17d9sm42855</request-id>
346 <notification-url>https://csi-tst-q22.it.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws</notification-url>
348 <order-version>1</order-version>
349 </request-information>
350 <sdnc-request-header>
351 <svc-action>activate</svc-action>
352 <svc-notification-url>https://localhost:8443/adapters/rest/SDNCNotify</svc-notification-url>
353 <svc-request-id>5b1f3c5d-cdf9-488d-8a4b-d3f1229d7760</svc-request-id>
354 </sdnc-request-header>
355 <l2-homing-information>
356 <topology>MultiPoint</topology>
357 <preferred-aic-clli>MTSNJA4LCP1</preferred-aic-clli>
358 <evc-name>AS/VLXM/003717//SW</evc-name>
359 </l2-homing-information>
360 <service-information>
361 <service-instance-id>FK/VLXM/003717//SW_INTERNET</service-instance-id>
362 <subscriber-name>ST E2E Test42855_1300004281555</subscriber-name>
363 <service-type>SDN-ETHERNET-INTERNET</service-type>
364 </service-information>
365 <internet-service-change-details>
366 <internet-evc-speed-value>10</internet-evc-speed-value>
367 <internet-evc-speed-units>Kbps</internet-evc-speed-units>
368 <t-provided-v4-lan-public-prefixes>
369 <request-index>1</request-index>
370 <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
371 <v4-lan-public-prefix>192.168.1.15</v4-lan-public-prefix>
372 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
373 </t-provided-v4-lan-public-prefixes>
374 <t-provided-v4-lan-public-prefixes>
375 <request-index>2</request-index>
376 <v4-next-hop-address>192.168.1.16</v4-next-hop-address>
377 <v4-lan-public-prefix>192.168.1.16</v4-lan-public-prefix>
378 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
379 </t-provided-v4-lan-public-prefixes>
380 <t-provided-v6-lan-public-prefixes>
381 <request-index>1</request-index>
382 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
383 <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
384 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
385 </t-provided-v6-lan-public-prefixes>
386 <t-provided-v6-lan-public-prefixes>
387 <request-index>1</request-index>
388 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
389 <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
390 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
391 </t-provided-v6-lan-public-prefixes>
392 </internet-service-change-details>
394 </layer3-service-list>
396 </sdncadapterworkflow:response-data>
397 </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
399 String sdncAdapterRequest = """
400 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
402 <aetgt:SDNCAdapterRequest xmlns:aetgt="http://org.onap/workflow/sdnc/adapter/schema/v1" xmlns:sdncadaptersc="http://org.onap/workflow/sdnc/adapter/schema/v1">
403 <sdncadapter:RequestHeader xmlns:sdncadapter="http://org.onap/workflow/sdnc/adapter/schema/v1">
404 <sdncadapter:RequestId>745b1b50-e39e-4685-9cc8-c71f0bde8bf0</sdncadapter:RequestId>
405 <sdncadapter:SvcAction>query</sdncadapter:SvcAction>
406 <sdncadapter:SvcOperation>services/layer3-service-list/AS%2FVLXM%2F000199%2F%2FSB_INTERNET</sdncadapter:SvcOperation>
407 <sdncadapter:CallbackUrl>http://myhost.com:28080/mso/sdncAdapterCallbackServiceImpl</sdncadapter:CallbackUrl>
408 </sdncadapter:RequestHeader>
409 <sdncadaptersc:RequestData>
410 <rest:payload xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"
411 contentType="text/xml">
412 <service-request xmlns="http://org.onap/so/request/details/schema/v1">
413 <request-information>
414 <request-id>12570a36-7388-4c0a-bec4-189ce3kg9956</request-id>
415 <request-action>GetLayer3ServiceDetailsRequest</request-action>
417 </request-information>
418 <service-information>
419 <service-type>SDN-ETHERNET-INTERNET</service-type>
420 <service-instance-id>PD/VLXM/003717//SW_INTERNET</service-instance-id>
421 </service-information>
424 </sdncadaptersc:RequestData></aetgt:SDNCAdapterRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>"""
426 String sdncAdapterResponse = """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
427 <sdncadapterworkflow:response-data>
428 <tag0:CallbackHeader xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1">
429 <tag0:RequestId>39542e39-ccc3-4d1a-8b79-04ce88526613</tag0:RequestId>
430 <tag0:ResponseCode>404</tag0:ResponseCode>
431 <tag0:ResponseMessage>Error processing request to SDNC. Not Found.
432 https://localhost:8443/restconf/config/L3SDN-API:services/layer3-service-list/MVM%2FVLXP%2F000855%2F%2FShakeout.
433 SDNC Returned-[error-type:application, error-tag:data-missing,
434 error-message:Request could not be completed because the relevant
435 data model content does not exist.]</tag0:ResponseMessage>
436 </tag0:CallbackHeader>
437 </sdncadapterworkflow:response-data>
438 </sdncadapterworkflow:SDNCAdapterWorkflowResponse>
441 String workflowErrorResponse = """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
442 <aetgt:ErrorMessage>Received error from SDN-C: Error processing request to SDNC. Not Found.
443 https://localhost:8443/restconf/config/L3SDN-API:services/layer3-service-list/MVM%2FVLXP%2F000855%2F%2FShakeout.
444 SDNC Returned-[error-type:application, error-tag:data-missing,
445 error-message:Request could not be completed because the relevant
446 data model content does not exist.]</aetgt:ErrorMessage>
447 <aetgt:ErrorCode>5300</aetgt:ErrorCode>
448 <aetgt:SourceSystemErrorCode>404</aetgt:SourceSystemErrorCode>
449 </aetgt:WorkflowException>"""
451 String workflowErrorResponse1 = """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
452 <aetgt:ErrorMessage>Invalid Callback Response from SDNC Adapter</aetgt:ErrorMessage>
453 <aetgt:ErrorCode>5300</aetgt:ErrorCode>
454 </aetgt:WorkflowException>"""
456 String enhancedCallbackRequestData =
457 """<tag0:RequestData xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1"
458 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
459 xsi:type="xs:string"> <layer3-service-list xmlns="com:att:sdnctl:l3api">
460 <service-instance-id>FK/VLXM/003717//SW_INTERNET</service-instance-id>
462 <rpc-name>service-configuration-operation</rpc-name>
463 <rpc-action>activate</rpc-action>
464 <request-status>synccomplete</request-status>
465 <final-indicator>N</final-indicator>
466 <l3sdn-action>Layer3ServiceActivateRequest</l3sdn-action>
467 <l3sdn-subaction>SUPP</l3sdn-subaction>
468 <response-timestamp>2015-04-28T21:32:11.386Z</response-timestamp>
471 <internet-evc-access-information>
472 <ip-version>ds</ip-version>
473 <internet-evc-speed-value>8</internet-evc-speed-value>
474 <internet-evc-speed-units>Mbps</internet-evc-speed-units>
475 </internet-evc-access-information>
476 <vr-lan xmlns="com:att:sdnctl:l3api">
480 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
481 <v6-static-route-prefix>2001:1890:12e3:2da::</v6-static-route-prefix>
482 <v6-static-route-prefix-length>28</v6-static-route-prefix-length>
485 <v4-static-route-prefix>255.255.252.1</v4-static-route-prefix>
486 <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
487 <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
490 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
491 <v6-static-route-prefix>2001:1890:12e3:2da::</v6-static-route-prefix>
492 <v6-static-route-prefix-length>28</v6-static-route-prefix-length>
495 <v4-static-route-prefix>255.255.252.2</v4-static-route-prefix>
496 <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
497 <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
500 <v4-static-route-prefix>255.255.252.3</v4-static-route-prefix>
501 <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
502 <v4-static-route-prefix-length>28</v4-static-route-prefix-length>
506 <v6-dhcp-server-enabled>N</v6-dhcp-server-enabled>
507 <v4-dhcp-server-enabled>Y</v4-dhcp-server-enabled>
508 <use-v6-default-pool>N</use-v6-default-pool>
509 <excluded-v4-dhcp-addresses-from-default-pool>
510 <excluded-v4-address>192.168.1.7</excluded-v4-address>
511 </excluded-v4-dhcp-addresses-from-default-pool>
512 <excluded-v4-dhcp-addresses-from-default-pool>
513 <excluded-v4-address>192.168.1.8</excluded-v4-address>
514 </excluded-v4-dhcp-addresses-from-default-pool>
516 <v4-dhcp-relay-next-hop-address>1.1.1.1</v4-dhcp-relay-next-hop-address>
517 <v4-dhcp-pool-prefix-length>28</v4-dhcp-pool-prefix-length>
518 <excluded-v4-addresses>
519 <excluded-v4-address>192.168.1.5</excluded-v4-address>
520 </excluded-v4-addresses>
521 <v4-dhcp-relay-gateway-address>2.2.2.1</v4-dhcp-relay-gateway-address>
522 <excluded-v4-addresses>
523 <excluded-v4-address>192.168.1.6</excluded-v4-address>
524 </excluded-v4-addresses>
525 <v4-dhcp-pool-prefix>192.155.2.3</v4-dhcp-pool-prefix>
528 <v4-dhcp-relay-next-hop-address>1.1.1.2</v4-dhcp-relay-next-hop-address>
529 <v4-dhcp-pool-prefix-length>28</v4-dhcp-pool-prefix-length>
530 <excluded-v4-addresses>
531 <excluded-v4-address>192.168.1.6</excluded-v4-address>
532 </excluded-v4-addresses>
533 <v4-dhcp-relay-gateway-address>2.2.2.2</v4-dhcp-relay-gateway-address>
534 <excluded-v4-addresses>
535 <excluded-v4-address>192.168.1.7</excluded-v4-address>
536 </excluded-v4-addresses>
537 <v4-dhcp-pool-prefix>192.155.2.4</v4-dhcp-pool-prefix>
539 <use-v4-default-pool>Y</use-v4-default-pool>
540 <excluded-v6-dhcp-addresses-from-default-pool>
541 <excluded-v6-address>1:5</excluded-v6-address>
542 </excluded-v6-dhcp-addresses-from-default-pool>
543 <excluded-v6-dhcp-addresses-from-default-pool>
544 <excluded-v6-address>1:6</excluded-v6-address>
545 </excluded-v6-dhcp-addresses-from-default-pool>
547 <v6-dhcp-relay-next-hop-address>4:4</v6-dhcp-relay-next-hop-address>
548 <v6-dhcp-pool-prefix-length>28</v6-dhcp-pool-prefix-length>
549 <excluded-v6-addresses>
550 <excluded-v6-address>1:1</excluded-v6-address>
551 </excluded-v6-addresses>
552 <v6-dhcp-relay-gateway-address>3:3</v6-dhcp-relay-gateway-address>
553 <excluded-v6-addresses>
554 <excluded-v6-address>2:2</excluded-v6-address>
555 </excluded-v6-addresses>
556 <v6-dhcp-pool-prefix>0:0</v6-dhcp-pool-prefix>
559 <v6-dhcp-relay-next-hop-address>4:4</v6-dhcp-relay-next-hop-address>
560 <v6-dhcp-pool-prefix-length>28</v6-dhcp-pool-prefix-length>
561 <excluded-v6-addresses>
562 <excluded-v6-address>1:1</excluded-v6-address>
563 </excluded-v6-addresses>
564 <v6-dhcp-relay-gateway-address>3:3</v6-dhcp-relay-gateway-address>
565 <excluded-v6-addresses>
566 <excluded-v6-address>2:2</excluded-v6-address>
567 </excluded-v6-addresses>
568 <v6-dhcp-pool-prefix>0:0</v6-dhcp-pool-prefix>
572 <stateful-firewall-lite-v6-enabled>N</stateful-firewall-lite-v6-enabled>
573 <stateful-firewall-lite-v4-enabled>Y</stateful-firewall-lite-v4-enabled>
574 <v4-firewall-packet-filters>
575 <v4-firewall-prefix>0.0.0.1</v4-firewall-prefix>
576 <v4-firewall-prefix-length>1</v4-firewall-prefix-length>
577 <allow-icmp-ping>Y</allow-icmp-ping>
579 <port-number>1</port-number>
582 <port-number>1</port-number>
584 </v4-firewall-packet-filters>
585 <v4-firewall-packet-filters>
586 <v4-firewall-prefix>0.0.0.2</v4-firewall-prefix>
587 <v4-firewall-prefix-length>2</v4-firewall-prefix-length>
588 <allow-icmp-ping>Y</allow-icmp-ping>
590 <port-number>2</port-number>
593 <port-number>2</port-number>
595 </v4-firewall-packet-filters>
596 <v6-firewall-packet-filters>
597 <v6-firewall-prefix>:</v6-firewall-prefix>
598 <v6-firewall-prefix-length>0</v6-firewall-prefix-length>
599 <allow-icmp-ping>Y</allow-icmp-ping>
601 <port-number>3</port-number>
604 <port-number>3</port-number>
606 </v6-firewall-packet-filters>
607 <v6-firewall-packet-filters>
608 <v6-firewall-prefix>:</v6-firewall-prefix>
609 <v6-firewall-prefix-length>1</v6-firewall-prefix-length>
610 <allow-icmp-ping>Y</allow-icmp-ping>
612 <port-number>4</port-number>
615 <port-number>4</port-number>
617 </v6-firewall-packet-filters>
621 <v4-pat-pool-prefix>192.168.1.44</v4-pat-pool-prefix>
622 <v4-pat-pool-next-hop-address>192.168.1.5</v4-pat-pool-next-hop-address>
623 <v4-pat-pool-prefix-length>0</v4-pat-pool-prefix-length>
625 <use-v4-default-pool>Y</use-v4-default-pool>
626 <v4-pat-enabled>N</v4-pat-enabled>
628 <v4-pat-pool-prefix>192.168.1.45</v4-pat-pool-prefix>
629 <v4-pat-pool-next-hop-address>192.168.1.6</v4-pat-pool-next-hop-address>
630 <v4-pat-pool-prefix-length>28</v4-pat-pool-prefix-length>
634 <v4-nat-enabled>Y</v4-nat-enabled>
635 <v4-nat-mapping-entries>
636 <v4-nat-internal>0.0.0.0</v4-nat-internal>
637 <v4-nat-next-hop-address>0.0.0.0</v4-nat-next-hop-address>
638 <v4-nat-external>0.0.0.0</v4-nat-external>
639 </v4-nat-mapping-entries>
640 <v4-nat-mapping-entries>
641 <v4-nat-internal>0.0.0.1</v4-nat-internal>
642 <v4-nat-next-hop-address>0.0.0.1</v4-nat-next-hop-address>
643 <v4-nat-external>0.0.0.1</v4-nat-external>
644 </v4-nat-mapping-entries>
646 <vr-designation>primary</vr-designation>
647 <v4-vce-loopback-address>162.200.3.144</v4-vce-loopback-address>
648 <v6-vr-lan-prefix-length>64</v6-vr-lan-prefix-length>
649 <v6-vce-wan-address>2001:1890:12e3:2da::</v6-vce-wan-address>
650 <v6-vr-lan-prefix>2620:0:10d0:f:ffff:ffff:ffff:fffe</v6-vr-lan-prefix>
651 <v4-vr-lan-prefix-length>24</v4-vr-lan-prefix-length>
652 <v4-vr-lan-prefix>10.192.27.254</v4-vr-lan-prefix>
653 <v4-public-lan-prefixes>
654 <t-provided-v4-lan-public-prefixes>
655 <request-index>1</request-index>
656 <v4-next-hop-address>192.168.1.2</v4-next-hop-address>
657 <v4-lan-public-prefix>192.168.1.1</v4-lan-public-prefix>
658 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
659 </t-provided-v4-lan-public-prefixes>
660 <t-provided-v4-lan-public-prefixes>
661 <request-index>1</request-index>
662 <v4-next-hop-address>192.168.1.72</v4-next-hop-address>
663 <v4-lan-public-prefix>192.168.1.71</v4-lan-public-prefix>
664 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
665 </t-provided-v4-lan-public-prefixes>
666 <t-provided-v4-lan-public-prefixes>
667 <request-index>1</request-index>
668 <v4-next-hop-address>192.168.1.68</v4-next-hop-address>
669 <v4-lan-public-prefix>192.168.1.67</v4-lan-public-prefix>
670 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
671 </t-provided-v4-lan-public-prefixes>
672 </v4-public-lan-prefixes>
673 <v6-public-lan-prefixes>
674 <t-provided-v6-lan-public-prefixes>
675 <request-index>1</request-index>
676 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
677 <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
678 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
679 </t-provided-v6-lan-public-prefixes>
680 <t-provided-v6-lan-public-prefixes>
681 <request-index>1</request-index>
682 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
683 <v6-lan-public-prefix>2001:1890:12e3:3da::</v6-lan-public-prefix>
684 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
685 </t-provided-v6-lan-public-prefixes>
686 <t-provided-v6-lan-public-prefixes>
687 <request-index>1</request-index>
688 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
689 <v6-lan-public-prefix>2001:1890:12e3:4da::</v6-lan-public-prefix>
690 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
691 </t-provided-v6-lan-public-prefixes>
692 </v6-public-lan-prefixes>
694 <routing-protocol>none</routing-protocol>
696 <ucpe-vms-service-information>
697 <transport-service-information>
698 <transport-service-type>AVPN</transport-service-type>
699 <access-circuit-info>
700 <access-circuit-id>1</access-circuit-id>
701 <dual-mode>Active</dual-mode>
702 </access-circuit-info>
703 <access-circuit-info>
704 <access-circuit-id>2</access-circuit-id>
705 <dual-mode>Standby</dual-mode>
706 </access-circuit-info>
707 </transport-service-information>
709 <ucpe-host-name>hostname</ucpe-host-name>
710 <ucpe-activation-code>activecode</ucpe-activation-code>
711 <out-of-band-management-modem>OOB</out-of-band-management-modem>
715 <vnf-instance-id>1</vnf-instance-id>
716 <vnf-sequence-number>1</vnf-sequence-number>
717 <vnf-type>ZZ</vnf-type>
718 <vnf-vendor>JUNIPER</vnf-vendor>
719 <vnf-model>MODEL1</vnf-model>
721 <prov-status>1</prov-status>
722 <operational-state>1</operational-state>
723 <orchestration-status>1</orchestration-status>
724 <equipment-role>1</equipment-role>
727 <vnf-instance-id>2</vnf-instance-id>
728 <vnf-sequence-number>2</vnf-sequence-number>
729 <vnf-type>HY</vnf-type>
730 <vnf-vendor>JUNIPER</vnf-vendor>
731 <vnf-model>MODEL2</vnf-model>
733 <prov-status>2</prov-status>
734 <operational-state>2</operational-state>
735 <orchestration-status>2</orchestration-status>
736 <equipment-role>2</equipment-role>
739 </ucpe-vms-service-information>
740 <request-information>
741 <request-action>Layer3ServiceActivateRequest</request-action>
742 <order-number>4281555</order-number>
743 <request-id>155415ab-b4a7-4382-b4c6-d17d9sm42855</request-id>
744 <notification-url>https://csi-tst-q22.it.com:22443/Services/com/cingular/csi/sdn/SendManagedNetworkStatusNotification.jws</notification-url>
746 <order-version>1</order-version>
747 </request-information>
748 <sdnc-request-header>
749 <svc-action>activate</svc-action>
750 <svc-notification-url>https://localhost:8443/adapters/rest/SDNCNotify</svc-notification-url>
751 <svc-request-id>5b1f3c5d-cdf9-488d-8a4b-d3f1229d7760</svc-request-id>
752 </sdnc-request-header>
753 <l2-homing-information>
754 <topology>MultiPoint</topology>
755 <preferred-aic-clli>MTSNJA4LCP1</preferred-aic-clli>
756 <evc-name>AS/VLXM/003717//SW</evc-name>
757 </l2-homing-information>
758 <service-information>
759 <service-instance-id>FK/VLXM/003717//SW_INTERNET</service-instance-id>
760 <subscriber-name>ST E2E Test42855_1300004281555</subscriber-name>
761 <service-type>SDN-ETHERNET-INTERNET</service-type>
762 </service-information>
763 <internet-service-change-details>
764 <internet-evc-speed-value>10</internet-evc-speed-value>
765 <internet-evc-speed-units>Kbps</internet-evc-speed-units>
766 <t-provided-v4-lan-public-prefixes>
767 <request-index>1</request-index>
768 <v4-next-hop-address>192.168.1.15</v4-next-hop-address>
769 <v4-lan-public-prefix>192.168.1.15</v4-lan-public-prefix>
770 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
771 </t-provided-v4-lan-public-prefixes>
772 <t-provided-v4-lan-public-prefixes>
773 <request-index>2</request-index>
774 <v4-next-hop-address>192.168.1.16</v4-next-hop-address>
775 <v4-lan-public-prefix>192.168.1.16</v4-lan-public-prefix>
776 <v4-lan-public-prefix-length>28</v4-lan-public-prefix-length>
777 </t-provided-v4-lan-public-prefixes>
778 <t-provided-v6-lan-public-prefixes>
779 <request-index>1</request-index>
780 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
781 <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
782 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
783 </t-provided-v6-lan-public-prefixes>
784 <t-provided-v6-lan-public-prefixes>
785 <request-index>1</request-index>
786 <v6-next-hop-address>2001:1890:12e3:2da::</v6-next-hop-address>
787 <v6-lan-public-prefix>2001:1890:12e3:2da::</v6-lan-public-prefix>
788 <v6-lan-public-prefix-length>28</v6-lan-public-prefix-length>
789 </t-provided-v6-lan-public-prefixes>
790 </internet-service-change-details>
792 </layer3-service-list>
796 def sdncAdapterResponseEmpty =
797 """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
798 <sdncadapterworkflow:response-data/>
799 </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
801 def sdncAdapterResponseError =
802 """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
803 xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1">
804 <sdncadapterworkflow:response-data>
805 <tag0:CallbackHeader>
806 <tag0:RequestId>39542e39-ccc3-4d1a-8b79-04ce88526613</tag0:RequestId>
807 <tag0:ResponseCode>404</tag0:ResponseCode>
808 <tag0:ResponseMessage>Error processing request to SDNC. Not Found.
809 https://localhost:8443/restconf/config/L3SDN-API:services/layer3-service-list/MVM%2FVLXP%2F000855%2F%2FShakeout.
810 SDNC Returned-[error-type:application, error-tag:data-missing,
811 error-message:Request could not be completed because the relevant
812 data model content does not exist.]</tag0:ResponseMessage>
813 </tag0:CallbackHeader>
814 </sdncadapterworkflow:response-data>
815 </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
819 public void testPreProcessRequest() {
821 String sdncAdapterWorkflowRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1/sdncadapterworkflowrequest.xml");
822 ExecutionEntity mockExecution = mock(ExecutionEntity.class)
823 when(mockExecution.getVariable("mso.adapters.po.auth")).thenReturn("5E12ACACBD552A415E081E29F2C4772F9835792A51C766CCFDD7433DB5220B59969CB2798C")
824 when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7")
825 when(mockExecution.getVariable("mso-request-id")).thenReturn("testReqId")
826 when(mockExecution.getVariable("sdncAdapterWorkflowRequest")).thenReturn(sdncAdapterWorkflowRequest)
827 when(mockExecution.getVariable("mso.workflow.sdncadapter.callback")).thenReturn("http://someurl.someting.com:28080/mso/sdncAdapterCallbackServiceImpl")
828 when(mockExecution.getVariable("mso.use.qualified.host")).thenReturn("true")
830 when(mockExecution.getProcessInstanceId()).thenReturn("745b1b50-e39e-4685-9cc8-c71f0bde8bf0")
831 when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
834 SDNCAdapter sdncAdapter = new SDNCAdapter()
835 sdncAdapter.preProcessRequest(mockExecution)
837 MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
838 debugger.printInvocations(mockExecution)
841 verify(mockExecution).setVariable("prefix","SDNCA_")
842 verify(mockExecution).setVariable("sdncAdapterResponse","")
843 verify(mockExecution).setVariable("asynchronousResponseTimeout",false)
844 verify(mockExecution).setVariable("continueListening",false)
845 verify(mockExecution).setVariable("serviceConfigActivate",false)
846 verify(mockExecution).setVariable("SDNCA_SuccessIndicator",false)
847 verify(mockExecution).setVariable("SDNCA_InterimNotify",false)
848 verify(mockExecution).setVariable("BasicAuthHeaderValue","Basic dGVzdDp0ZXN0")
849 verify(mockExecution).setVariable("source","")
850 verify(mockExecution).setVariable("SDNCA_requestId", "745b1b50-e39e-4685-9cc8-c71f0bde8bf0")
851 verify(mockExecution).setVariable("sdncAdapterRequest", sdncAdapterRequest)
855 public void testProcessResponse()
857 String sdncAdapterCallbackResponse = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/SDNCAdapterV1mock/sdncadaptercallbackrequest.xml");
858 ExecutionEntity mockExecution = mock(ExecutionEntity.class)
859 when(mockExecution.getVariable("sdncAdapterCallbackRequest")).thenReturn(sdncAdapterCallbackResponse)
860 SDNCAdapter sdncAdapter = new SDNCAdapter()
861 sdncAdapter.postProcessResponse(mockExecution)
863 // MockitoDebuggerImpl debugger = new MockitoDebuggerImpl()
864 // debugger.printInvocations(mockExecution)
866 verify(mockExecution,times(2)).getVariable("sdncAdapterCallbackRequest")
867 // verify(mockExecution).setVariable("enhancedCallbackRequestData",enhancedCallbackRequestData)
868 verify(mockExecution).setVariable("sdncAdapterResponse",workflowResponse)
869 verify(mockExecution).setVariable("continueListening",false)
874 public void testProcessResponse_ErrorCase_404()
876 String sdncAdapterCallbackErrorResponse = FileUtil.readResourceFile("sdncadaptercallbackrequest_404CallBack.xml");
877 ExecutionEntity mockExecution = mock(ExecutionEntity.class)
878 when(mockExecution.getVariable("sdncAdapterCallbackRequest")).thenReturn(sdncAdapterCallbackErrorResponse)
879 SDNCAdapter sdncAdapter = new SDNCAdapter()
880 sdncAdapter.postProcessResponse(mockExecution)
882 verify(mockExecution,times(2)).getVariable("sdncAdapterCallbackRequest")
883 verify(mockExecution).setVariable("sdncAdapterResponse", sdncAdapterResponseError)
884 verify(mockExecution).setVariable("enhancedCallbackRequestData", "")
885 verify(mockExecution).setVariable("continueListening",false)
890 public void testProcessResponse_ErrorCase_InvalidCallback()
892 ExecutionEntity mockExecution = mock(ExecutionEntity.class)
893 when(mockExecution.getVariable("sdncAdapterCallbackRequest")).thenReturn("<h1>Service Unavailable</h1>")
894 SDNCAdapter sdncAdapter = new SDNCAdapter()
895 sdncAdapter.postProcessResponse(mockExecution)
897 verify(mockExecution,times(2)).getVariable("sdncAdapterCallbackRequest")
898 verify(mockExecution).setVariable("sdncAdapterResponse", sdncAdapterResponseEmpty)
899 verify(mockExecution).setVariable("enhancedCallbackRequestData", "")
900 verify(mockExecution).setVariable("continueListening",false)
905 public void postProcessResponse()
908 String SDNCAdapterCallbackRequest =
909 """<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
910 <SDNCAdapterCallbackRequest
911 xmlns="http://org.onap/workflow/sdnc/adapter/schema/v1">
913 <RequestId>3bb02798-b344-4d28-9bca-1f029954d1c9</RequestId>
914 <ResponseCode>404</ResponseCode>
915 <ResponseMessage>Error processing request to SDNC. Not Found.
916 https://localhost:8443/restconf/config/L3SDN-API:services/layer3-service-list/85%2FCSIP%2F141203%2FPT_CSI9999998693.
917 SDNC Returned-[error-type:application, error-tag:data-missing,
918 error-message:Request could not be completed because the relevant
919 data model content does not exist ]</ResponseMessage>
921 </SDNCAdapterCallbackRequest>"""
923 String sdncAdapterResponse =
924 """<sdncadapterworkflow:SDNCAdapterWorkflowResponse xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1"
925 xmlns:tag0="http://org.onap/workflow/sdnc/adapter/schema/v1">
926 <sdncadapterworkflow:response-data>
927 <tag0:CallbackHeader>
928 <tag0:RequestId>3bb02798-b344-4d28-9bca-1f029954d1c9</tag0:RequestId>
929 <tag0:ResponseCode>404</tag0:ResponseCode>
930 <tag0:ResponseMessage>Error processing request to SDNC. Not Found.
931 https://localhost:8443/restconf/config/L3SDN-API:services/layer3-service-list/85%2FCSIP%2F141203%2FPT_CSI9999998693.
932 SDNC Returned-[error-type:application, error-tag:data-missing,
933 error-message:Request could not be completed because the relevant
934 data model content does not exist ]</tag0:ResponseMessage>
935 </tag0:CallbackHeader>
936 </sdncadapterworkflow:response-data>
937 </sdncadapterworkflow:SDNCAdapterWorkflowResponse>"""
939 ExecutionEntity mockExecution = mock(ExecutionEntity.class)
940 when(mockExecution.getVariable("sdncAdapterCallbackRequest")).thenReturn(SDNCAdapterCallbackRequest)
941 SDNCAdapter sdncAdapter = new SDNCAdapter()
942 sdncAdapter.postProcessResponse(mockExecution)
944 verify(mockExecution,times(2)).getVariable("sdncAdapterCallbackRequest")
945 verify(mockExecution).setVariable("sdncAdapterResponse", sdncAdapterResponse)
946 verify(mockExecution).setVariable("enhancedCallbackRequestData", "")
947 verify(mockExecution).setVariable("continueListening",false)