Merge changes from topics "VID-14", "VID-13", "VID-12"
[vid.git] / vid-webpack-master / src / app / shared / storeUtil / utils / service / service.reducers.spec.ts
1 import {ServiceInstance} from "../../../models/serviceInstance";
2 import {
3   AddServiceAction,
4   ChangeServiceDirty,
5   CreateServiceInstanceAction,
6   DeleteServiceInstanceAction,
7   ServiceActions,
8   UpdateServiceInstanceAction,
9   UpdateServiceModelAction, UpgradeServiceAction
10 } from "./service.actions";
11 import {serviceReducer} from "./service.reducers";
12 import {ServiceInstanceActions} from "../../../models/serviceInstanceActions";
13 import {VidNotions} from "../../../models/vidNotions";
14
15 describe('serviceReducer', () => {
16
17   test('#UPDATE_SERVICE_INSTANCE should update exiting instance without change his child', () => {
18     const serviceUuid: string = 'serviceUuid';
19     const actionName: ServiceInstanceActions = ServiceInstanceActions.Create;
20
21     const elemntThatShouldNotOverideOnUpdateService = {
22       vnfs: {
23         "2017-388_PASQUALE-vPE 0": {
24           "action": "Create",
25           "inMaint": false,
26           "rollbackOnFailure": "true",
27           "originalName": "2017-388_PASQUALE-vPE 0",
28           "isMissingData": false,
29           "trackById": "eymgwlevh54",
30           "vfModules": {},
31           "vnfStoreKey": "2017-388_PASQUALE-vPE 0",
32           "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168",
33           "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
34           "lcpCloudRegionId": "AAIAIC25",
35           "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
36           "lineOfBusiness": "ONAP",
37           "platformName": "platform",
38           "modelInfo": {
39             "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
40             "modelVersionId": "afacccf6-397d-45d6-b5ae-94c39734b168",
41             "modelName": "2017-388_PASQUALE-vPE",
42             "modelVersion": "4.0",
43             "modelCustomizationId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c",
44             "modelCustomizationName": "2017-388_PASQUALE-vPE 0",
45             "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168",
46             "modelUniqueId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c"
47           },
48           "instanceName": "2017-388_PASQUALE-vPEAjXzainstanceName",
49           "legacyRegion": "some legacy region",
50           "instanceParams": [
51             {
52               "vnf_config_template_version": "17.2",
53               "bandwidth_units": "Gbps",
54               "bandwidth": "10",
55               "AIC_CLLI": "ATLMY8GA",
56               "ASN": "AV_vPE",
57               "vnf_instance_name": "mtnj309me6"
58             }
59           ]
60         },
61         "2017-488_PASQUALE-vPE 0": {
62           "action": "Create",
63           "inMaint": false,
64           "rollbackOnFailure": "true",
65           "originalName": "2017-488_PASQUALE-vPE 0",
66           "isMissingData": false,
67           "trackById": "xr6o2782z7",
68           "vfModules": {
69             "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": {
70               "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0wmkjw": {
71                 "isMissingData": true,
72                 "sdncPreReload": null,
73                 "modelInfo": {
74                   "modelType": "VFmodule",
75                   "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
76                   "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
77                   "modelName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
78                   "modelVersion": "5",
79                   "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
80                   "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
81                   "modelUniqueId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3"
82                 },
83                 "instanceParams": [
84                   {}
85                 ],
86                 "trackById": "a19sjb1ez2"
87               }
88             }
89           },
90           "vnfStoreKey": "2017-488_PASQUALE-vPE 0",
91           "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
92           "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
93           "lcpCloudRegionId": "AAIAIC25",
94           "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
95           "lineOfBusiness": "ONAP",
96           "platformName": "platform",
97           "modelInfo": {
98             "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
99             "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
100             "modelName": "2017-488_PASQUALE-vPE",
101             "modelVersion": "5.0",
102             "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
103             "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
104             "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
105             "modelUniqueId": "1da7b585-5e61-4993-b95e-8e6606c81e45"
106           },
107           "instanceName": "2017-488_PASQUALE-vPEVNFinstancename",
108           "legacyRegion": "some legacy region",
109           "instanceParams": [
110             {
111               "vnf_config_template_version": "17.2",
112               "bandwidth_units": "Gbps",
113               "bandwidth": "10",
114               "AIC_CLLI": "ATLMY8GA",
115               "ASN": "AV_vPE",
116               "vnf_instance_name": "mtnj309me6"
117             }
118           ]
119         }
120       },
121       existingVNFCounterMap: {
122         "b3c76f73-eeb5-4fb6-9d31-72a889f1811c": 1,
123         "1da7b585-5e61-4993-b95e-8e6606c81e45": 1
124       },
125       existingVnfGroupCounterMap: {},
126       existingNetworksCounterMap: {},
127       optionalGroupMembersMap : {},
128       networks : {},
129       vnfGroups : {}
130     };
131
132
133     let service = serviceReducer(<any>{
134       "serviceInstance": {
135         "6b528779-44a3-4472-bdff-9cd15ec93450": {
136           "action": "Create",
137           "isDirty": true,
138           "vnfs": elemntThatShouldNotOverideOnUpdateService.vnfs,
139           "instanceParams": [
140             {
141               "2017488_pasqualevpe0_ASN": "AV_vPE"
142             }
143           ],
144           "validationCounter": 1,
145           "existingNames": {
146             "ajxzainstancename": "",
147             "2017-488_pasquale-vpevnfinstancename": "",
148             "2017-388_pasquale-vpeajxzainstancename": ""
149           },
150           "existingVNFCounterMap": elemntThatShouldNotOverideOnUpdateService.existingVNFCounterMap,
151           "existingVnfGroupCounterMap": elemntThatShouldNotOverideOnUpdateService.existingVnfGroupCounterMap,
152           "existingNetworksCounterMap": elemntThatShouldNotOverideOnUpdateService.existingNetworksCounterMap,
153           "optionalGroupMembersMap":elemntThatShouldNotOverideOnUpdateService.optionalGroupMembersMap,
154           "networks": elemntThatShouldNotOverideOnUpdateService.networks,
155           "vnfGroups": elemntThatShouldNotOverideOnUpdateService.vnfGroups,
156           "bulkSize": "3",
157           "instanceName": "AjXzainstancename",
158           "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
159           "subscriptionServiceType": "TYLER SILVIA",
160           "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
161           "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
162           "lcpCloudRegionId": "hvf6",
163           "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
164           "aicZoneId": "NFT1",
165           "projectName": "WATKINS",
166           "rollbackOnFailure": "true",
167           "aicZoneName": "NFTJSSSS-NFT1",
168           "owningEntityName": "WayneHolland",
169           "testApi": "VNF_API",
170           "tenantName": "AIN Web Tool-15-D-testalexandria",
171           "modelInfo": {
172             "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
173             "modelVersionId": "6b528779-44a3-4472-bdff-9cd15ec93450",
174             "modelName": "action-data",
175             "modelVersion": "1.0",
176             "uuid": "6b528779-44a3-4472-bdff-9cd15ec93450",
177             "modelUniqueId": "6b528779-44a3-4472-bdff-9cd15ec93450"
178           },
179           "isALaCarte": false,
180           "name": "action-data",
181           "version": "1.0",
182           "description": "",
183           "category": "",
184           "uuid": "6b528779-44a3-4472-bdff-9cd15ec93450",
185           "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
186           "serviceType": "",
187           "serviceRole": "",
188           "vidNotions": {
189             "instantiationUI": "legacy",
190             "modelCategory": "other",
191             "viewEditUI": "legacy"
192           },
193           "isEcompGeneratedNaming": false,
194           "isMultiStepDesign": false
195         }
196       },
197     }, <UpdateServiceInstanceAction>{
198       type: ServiceActions.UPDATE_SERVICE_INSTANCE,
199       serviceUuid: "6b528779-44a3-4472-bdff-9cd15ec93450",
200       serviceInstance: <any>{
201         aicZoneId: "ATL53",
202         aicZoneName: "AAIATLTE-ATL53",
203         bulkSize: 1,
204         category: "",
205         description: "",
206         globalSubscriberId: "e433710f-9217-458d-a79d-1c7aff376d89",
207         instanceName: "yoav",
208         instanceParams: [{}],
209         invariantUuid: "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
210         isALaCarte: false,
211         isEcompGeneratedNaming: false,
212         isMultiStepDesign: false,
213         lcpCloudRegionId: "AAIAIC25",
214         modelInfo: {
215           modelInvariantId: "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
216           modelVersionId: "6b528779-44a3-4472-bdff-9cd15ec93450",
217           modelName: "action-data",
218           modelVersion: "1.0"
219         },
220         name: "action-data",
221         owningEntityId: "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
222         owningEntityName: "WayneHolland",
223         productFamilyId: "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
224         projectName: "WATKINS",
225         rollbackOnFailure: "true",
226         serviceRole: "",
227         serviceType: "",
228         subscriptionServiceType: "TYLER SILVIA",
229         tenantId: "092eb9e8e4b7412e8787dd091bc58e86",
230         tenantName: "USP-SIP-IC-24335-T-01",
231         testApi: "VNF_API",
232         uuid: "6b528779-44a3-4472-bdff-9cd15ec93450",
233         version: "1.0",
234         vidNotions: {instantiationUI: "legacy", modelCategory: "other", viewEditUI: "legacy"}
235       }
236     });
237     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"]).toBeDefined();
238
239     for(const element in elemntThatShouldNotOverideOnUpdateService){
240       expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"][element]).toEqual(elemntThatShouldNotOverideOnUpdateService[element]);
241     }
242
243     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"].aicZoneId).toEqual("ATL53");
244     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"].owningEntityId).toEqual("d61e6f2d-12fa-4cc2-91df-7c244011d6fc");
245     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"].owningEntityName).toEqual("WayneHolland");
246     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"].productFamilyId).toEqual("d8a6ed93-251c-47ca-adc9-86671fd19f4c");
247     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"].projectName).toEqual("WATKINS");
248     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"].rollbackOnFailure).toEqual("true");
249     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"].subscriptionServiceType).toEqual("TYLER SILVIA");
250     expect(service.serviceInstance["6b528779-44a3-4472-bdff-9cd15ec93450"].tenantId).toEqual("092eb9e8e4b7412e8787dd091bc58e86");
251
252   });
253
254   test('#ADD_SERVICE_ACTION should add action to the service', () => {
255     const serviceUuid: string = 'serviceUuid';
256     const actionName: ServiceInstanceActions = ServiceInstanceActions.Create;
257
258     let service = serviceReducer(<any>{
259       serviceInstance: {
260         'serviceUuid': {}
261       }
262     }, <AddServiceAction>{
263       type: ServiceActions.ADD_SERVICE_ACTION,
264       serviceUuid: 'serviceUuid',
265       action: actionName
266     });
267     expect(service.serviceInstance[serviceUuid]['action']).toEqual(actionName);
268   });
269
270   test('#CREATE_SERVICE_INSTANCE shall put the instance on state with all its values ', () => {
271     const serviceUuid: string = 'serviceUuid';
272     const vidNotions:VidNotions = {
273       instantiationUI: "some5G",
274       modelCategory: "5G Provider Network",
275       viewEditUI: "legacy",
276       instantiationType: "ALaCarte"
277     };
278
279     let serviceInstanceObject: ServiceInstance = <any>{
280       isDirty: false,
281       instanceName: 'instanceName',
282       isEcompGeneratedNaming: false,
283       globalSubscriberId: 'globalSubscriberId',
284       productFamilyId: 'productFamilyId',
285       subscriptionServiceType: 'subscriptionServiceType',
286       lcpCloudRegionId: 'lcpCloudRegionId',
287       tenantId: 'tenantId',
288       tenantName: 'tenantName',
289       aicZoneId: 'aicZoneId',
290       aicZoneName: 'aicZoneName',
291       projectName: 'projectName',
292       owningEntityId: 'owningEntityId',
293       owningEntityName: 'owningEntityName',
294       existingVnfGroupCounterMap: {},
295       existingVNFCounterMap: {},
296       existingNetworksCounterMap: {},
297       pause: false,
298       bulkSize: 1,
299       vnfs: {},
300       vnfGroups: {},
301       networks: {},
302       instanceParams: [],
303       rollbackOnFailure: false,
304       subscriberName: 'subscriberName',
305       validationCounter: 0,
306       existingNames: {},
307       action: ServiceInstanceActions.Create
308     };
309
310     let serviceState = serviceReducer(
311       <any>{
312         serviceInstance: {},
313         serviceHierarchy: {
314           [serviceUuid]: {
315             service: {
316               vidNotions: vidNotions
317             }
318           }
319         }
320       },
321       <CreateServiceInstanceAction>{
322         type: ServiceActions.CREATE_SERVICE_INSTANCE,
323         serviceUuid: serviceUuid,
324         serviceInstance: serviceInstanceObject
325       }).serviceInstance[serviceUuid];
326
327     expect(serviceState.instanceName).toEqual(serviceInstanceObject.instanceName);
328     expect(serviceState.isEcompGeneratedNaming).toEqual(serviceInstanceObject.isEcompGeneratedNaming);
329     expect(serviceState.globalSubscriberId).toEqual(serviceInstanceObject.globalSubscriberId);
330     expect(serviceState.productFamilyId).toEqual(serviceInstanceObject.productFamilyId);
331     expect(serviceState.subscriptionServiceType).toEqual(serviceInstanceObject.subscriptionServiceType);
332     expect(serviceState.lcpCloudRegionId).toEqual(serviceInstanceObject.lcpCloudRegionId);
333     expect(serviceState.tenantId).toEqual(serviceInstanceObject.tenantId);
334     expect(serviceState.tenantName).toEqual(serviceInstanceObject.tenantName);
335     expect(serviceState.aicZoneId).toEqual(serviceInstanceObject.aicZoneId);
336     expect(serviceState.aicZoneName).toEqual(serviceInstanceObject.aicZoneName);
337     expect(serviceState.projectName).toEqual(serviceInstanceObject.projectName);
338     expect(serviceState.owningEntityId).toEqual(serviceInstanceObject.owningEntityId);
339     expect(serviceState.owningEntityName).toEqual(serviceInstanceObject.owningEntityName);
340     expect(serviceState.pause).toEqual(serviceInstanceObject.pause);
341     expect(serviceState.bulkSize).toEqual(serviceInstanceObject.bulkSize);
342     expect(serviceState.vnfs).toEqual(serviceInstanceObject.vnfs);
343     expect(serviceState.instanceParams).toEqual(serviceInstanceObject.instanceParams);
344     expect(serviceState.rollbackOnFailure).toEqual(serviceInstanceObject.rollbackOnFailure);
345     expect(serviceState.subscriberName).toEqual(serviceInstanceObject.subscriberName);
346     expect(serviceState.vidNotions).toEqual(vidNotions);
347   });
348
349
350   test('#DELETE_ALL_SERVICE_INSTANCES should delete all services', () => {
351     const state = serviceReducer(<any>{
352         serviceInstance: {
353           'service-1': {},
354           'service-2': {}
355         }
356       },
357       <CreateServiceInstanceAction>{
358         type: ServiceActions.DELETE_ALL_SERVICE_INSTANCES
359       });
360
361     expect(state.serviceInstance['service-1']).toBeUndefined();
362     expect(state.serviceInstance['service-2']).toBeUndefined();
363   });
364
365   test('#DELETE_SERVICE_INSTANCE should delete service', () => {
366     const state = serviceReducer(<any>{
367         serviceInstance: {
368           'service-1': {}
369         }
370       },
371       <DeleteServiceInstanceAction>{
372         type: ServiceActions.DELETE_ALL_SERVICE_INSTANCES
373       });
374
375     expect(state.serviceInstance['service-1']).toBeUndefined();
376   });
377
378   test('#UPDATE_MODEL should update service model ', () => {
379     const state = serviceReducer(<any>{
380         serviceHierarchy: {}
381       },
382       <UpdateServiceModelAction>{
383         type: ServiceActions.UPDATE_MODEL,
384         serviceHierarchy: {
385           service: {
386             uuid: 'uuid-1'
387           }
388         }
389       });
390
391     expect(state.serviceHierarchy['uuid-1'].service).toBeDefined();
392   });
393
394   test('#UPDATE_MODEL should update service model with vnfGroups ', () => {
395     const state = serviceReducer(<any>{
396         serviceHierarchy: {}
397       },
398       <UpdateServiceModelAction>{
399         type: ServiceActions.UPDATE_MODEL,
400         serviceHierarchy: {
401           service: {
402             uuid: 'uuid-1'
403           },
404           vnfs: {},
405           vnfGroups: {
406             'vnfGrouop_1': {
407               uuid: 'vnfGroup_uuid_1',
408               name: 'vnfGroup_name_1',
409               type: 'Group'
410             },
411             'vnfGrouop_2': {
412               uuid: 'vnfGroup_uuid_2',
413               name: 'vnfGroup_name_2',
414               type: 'Group'
415             }
416           }
417         }
418       });
419
420     expect(state.serviceHierarchy['uuid-1']).toBeDefined();
421     expect(state.serviceHierarchy['uuid-1'].vnfGroups['vnfGrouop_1']).toBeDefined();
422     expect(state.serviceHierarchy['uuid-1'].vnfGroups['vnfGrouop_2']).toBeDefined();
423   });
424
425   test('#CHANGE_SERVICE_IS_DIRTY should update service isDirty flag : service is not dirty ', () => {
426     const state = serviceReducer(<any>{
427         serviceInstance: {
428           'serviceId': {
429             action: ServiceInstanceActions.None,
430             'vnfs': {
431               'vnf1': {
432                 action: ServiceInstanceActions.None
433               },
434               'vnf2': {
435                 action: ServiceInstanceActions.None
436               }
437             }
438
439           }
440         }
441       },
442       <ChangeServiceDirty>{
443         type: ServiceActions.CHANGE_SERVICE_IS_DIRTY,
444         nodes: [
445           {
446             action: ServiceInstanceActions.None
447           },
448           {
449             action: ServiceInstanceActions.None
450           }],
451         serviceId: 'serviceId'
452
453       });
454
455     expect(state.serviceInstance['serviceId'].isDirty).toBeFalsy();
456   });
457
458   test('#CHANGE_SERVICE_IS_DIRTY should update service isDirty flag : service is dirty should return true', () => {
459     const state = serviceReducer(<any>{
460         serviceInstance: {
461           'serviceId': {
462             action: ServiceInstanceActions.Create
463
464           }
465         }
466       },
467       <ChangeServiceDirty>{
468         type: ServiceActions.CHANGE_SERVICE_IS_DIRTY,
469         nodes: [
470           {
471             action: ServiceInstanceActions.None
472           },
473           {
474             action: ServiceInstanceActions.None
475           }],
476         serviceId: 'serviceId'
477
478       });
479
480     expect(state.serviceInstance['serviceId'].isDirty).toBeTruthy();
481   });
482
483   test('#CHANGE_SERVICE_IS_DIRTY should update service isDirty flag : vnf is dirty ', () => {
484     const state = serviceReducer(<any>{
485         serviceInstance: {
486           'serviceId': {
487             action: ServiceInstanceActions.None,
488             'vnfs': {
489               'vnf1': {
490                 action: ServiceInstanceActions.None
491               },
492               'vnf2': {
493                 action: ServiceInstanceActions.Create
494               }
495             }
496
497           }
498         }
499       },
500       <ChangeServiceDirty>{
501         type: ServiceActions.CHANGE_SERVICE_IS_DIRTY,
502         nodes: [
503           {
504             action: ServiceInstanceActions.None
505           },
506           {
507             action: ServiceInstanceActions.Create
508           }],
509         serviceId: 'serviceId'
510
511       });
512
513     expect(state.serviceInstance['serviceId'].isDirty).toBeTruthy();
514   });
515
516   test('#UPGRADE_SERVICE should update service action to _Upgrade', () => {
517     const state = serviceReducer(<any>{
518         serviceInstance: {
519           'serviceId': {
520             action: ServiceInstanceActions.None,
521             upgradedVFMSonsCounter: 0,
522             'vnfs': {
523               'vnf1': {
524                 action: ServiceInstanceActions.None
525               },
526               'vnf2': {
527                 action: ServiceInstanceActions.Create
528               }
529             }
530
531           }
532         }
533       },
534       <UpgradeServiceAction> {
535         type: ServiceActions.UPGRADE_SERVICE_ACTION,
536         serviceUuid: 'serviceId'
537       });
538
539     expect(state.serviceInstance['serviceId'].isUpgraded).toBeTruthy();
540     expect(state.serviceInstance['serviceId'].action).toEqual(ServiceInstanceActions.None_Upgrade);
541     expect(state.serviceInstance['serviceId'].upgradedVFMSonsCounter).toEqual(1);
542
543   });
544
545   test('#UNDO_UPGRADE_SERVICE should cancel the upgrade action back to None', () => {
546     const state = serviceReducer(<any>{
547         serviceInstance: {
548           'serviceId': {
549             isUpgraded: true,
550             upgradedVFMSonsCounter: 1,
551             action: ServiceInstanceActions.None_Upgrade,
552             'vnfs': {
553               'vnf1': {
554                 action: ServiceInstanceActions.None_Upgrade
555               },
556               'vnf2': {
557                 action: ServiceInstanceActions.Create
558               }
559             }
560
561           }
562         }
563       },
564       <UpgradeServiceAction> {
565         type: ServiceActions.UNDO_UPGRADE_SERVICE_ACTION,
566         serviceUuid: 'serviceId'
567       });
568
569     expect(state.serviceInstance['serviceId'].isUpgraded).toBeFalsy();
570     expect(state.serviceInstance['serviceId'].action).toEqual(ServiceInstanceActions.None);
571     expect(state.serviceInstance['serviceId'].upgradedVFMSonsCounter).toEqual(0);
572   });
573
574 });