diff --git a/openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js b/openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js
index f997a64..11422b4 100644
--- a/openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js
+++ b/openecomp-ui/test-utils/factories/licenseModel/EntitlementPoolFactories.js
@@ -1,5 +1,5 @@
 /*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,46 +13,48 @@
  * or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
-import {Factory} from 'rosie';
-import {overviewEditorHeaders} from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';
+import { Factory } from 'rosie';
+import { overviewEditorHeaders } from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';
 
-Factory.define('EntitlementPoolBaseFactory')
-	.attrs({
-		name: 'EntitlementPoolName',
-		description: 'description'
-	});
+Factory.define('EntitlementPoolBaseFactory').attrs({
+    name: 'EntitlementPoolName',
+    description: 'description'
+});
 
 Factory.define('EntitlementPoolExtendedBaseFactory')
-	.extend('EntitlementPoolBaseFactory')
-	.attrs({
-		thresholdValue: 76,
-		thresholdUnits: '%',
-		increments: 'string',
-		startDate: (new Date()).getTime(),
-		expiryDate: (new Date()).getTime()
-	});
+    .extend('EntitlementPoolBaseFactory')
+    .attrs({
+        manufacturerReferenceNumber: '1231322',
+        thresholdValue: 76,
+        thresholdUnits: '%',
+        increments: 'string',
+        startDate: new Date().getTime(),
+        expiryDate: new Date().getTime()
+    });
 
 export const EntitlementPoolListItemFactory = new Factory()
-	.extend('EntitlementPoolBaseFactory')
-	.attrs({
-		id: () => Math.floor(Math.random() * (1000 - 1) + 1),
-		itemType: overviewEditorHeaders.ENTITLEMENT_POOL
-	});
+    .extend('EntitlementPoolBaseFactory')
+    .attrs({
+        id: () => Math.floor(Math.random() * (1000 - 1) + 1),
+        versionUUID: () => Math.floor(Math.random() * (1000 - 1) + 1),
+        itemType: overviewEditorHeaders.ENTITLEMENT_POOL
+    });
 
 export const EntitlementPoolStoreFactory = new Factory()
-	.extend('EntitlementPoolExtendedBaseFactory')
-	.attrs({
-		id: () => Math.floor(Math.random() * (1000 - 1) + 1),
-		referencingFeatureGroups: []
-	});
+    .extend('EntitlementPoolExtendedBaseFactory')
+    .attrs({
+        id: () => Math.floor(Math.random() * (1000 - 1) + 1),
+        referencingFeatureGroups: []
+    });
 
 export const EntitlementPoolDataListFactory = new Factory()
-	.extend('EntitlementPoolExtendedBaseFactory')
-	.attrs({
-		id: () => Math.floor(Math.random() * (1000 - 1) + 1),
-		referencingFeatureGroups: [],
-		itemType: overviewEditorHeaders.ENTITLEMENT_POOL
-	});
+    .extend('EntitlementPoolExtendedBaseFactory')
+    .attrs({
+        id: () => Math.floor(Math.random() * (1000 - 1) + 1),
+        referencingFeatureGroups: [],
+        itemType: overviewEditorHeaders.ENTITLEMENT_POOL
+    });
 
-export const EntitlementPoolPostFactory = new Factory()
-	.extend('EntitlementPoolExtendedBaseFactory');
+export const EntitlementPoolPostFactory = new Factory().extend(
+    'EntitlementPoolExtendedBaseFactory'
+);
diff --git a/openecomp-ui/test-utils/factories/licenseModel/FeatureGroupFactories.js b/openecomp-ui/test-utils/factories/licenseModel/FeatureGroupFactories.js
index 4220979..125e5c7 100644
--- a/openecomp-ui/test-utils/factories/licenseModel/FeatureGroupFactories.js
+++ b/openecomp-ui/test-utils/factories/licenseModel/FeatureGroupFactories.js
@@ -1,5 +1,5 @@
 /*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,69 +14,68 @@
  * permissions and limitations under the License.
  */
 import { Factory } from 'rosie';
-import {overviewEditorHeaders} from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';
+import { overviewEditorHeaders } from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';
 import IdMixin from 'test-utils/factories/mixins/IdMixin.js';
 
-Factory.define('FeatureGroupBaseFactory')
-	.attrs({
-		'name': 'featureGroup',
-		'description': 'description'
-	});
+Factory.define('FeatureGroupBaseFactory').attrs({
+    name: 'featureGroup',
+    description: 'description'
+});
 
 Factory.define('FeatureGroupExtendedBaseFactory')
-	.extend('FeatureGroupBaseFactory')
-	.attrs({
-		'partNumber': '1212'
-	});
+    .extend('FeatureGroupBaseFactory')
+    .attrs({
+        partNumber: '1212'
+    });
 
 export const FeatureGroupListItemFactory = new Factory()
-	.extend('FeatureGroupBaseFactory')
-	.extend(IdMixin)
-	.attrs({
-		children: [],
-		isCollapsed: true,
-		itemType: overviewEditorHeaders.FEATURE_GROUP
-	});
+    .extend('FeatureGroupBaseFactory')
+    .extend(IdMixin)
+    .attrs({
+        children: [],
+        isCollapsed: true,
+        itemType: overviewEditorHeaders.FEATURE_GROUP
+    });
 
 export const FeatureGroupDispatchFactory = new Factory()
-	.extend('FeatureGroupExtendedBaseFactory')
-	.attrs({
-		'licenseKeyGroupsIds': [],
-		'entitlementPoolsIds': []
-	});
+    .extend('FeatureGroupExtendedBaseFactory')
+    .attrs({
+        licenseKeyGroupsIds: [],
+        entitlementPoolsIds: []
+    });
 
 export const FeatureGroupStoreFactory = new Factory()
-	.extend('FeatureGroupExtendedBaseFactory')
-	.extend(IdMixin)
-	.attrs({
-		licenseKeyGroupsIds: [],
-		entitlementPoolsIds: [],
-		referencingLicenseAgreements: []
-	});
+    .extend('FeatureGroupExtendedBaseFactory')
+    .extend(IdMixin)
+    .attrs({
+        licenseKeyGroupsIds: [],
+        entitlementPoolsIds: [],
+        referencingLicenseAgreements: []
+    });
 
 export const FeatureGroupDataListFactory = new Factory()
-	.extend('FeatureGroupExtendedBaseFactory')
-	.extend(IdMixin)
-	.attrs({
-		licenseKeyGroupsIds: [],
-		entitlementPoolsIds: [],
-		referencingLicenseAgreements: [],
-		children: [],
-		itemType: overviewEditorHeaders.FEATURE_GROUP
-	});
+    .extend('FeatureGroupExtendedBaseFactory')
+    .extend(IdMixin)
+    .attrs({
+        licenseKeyGroupsIds: [],
+        entitlementPoolsIds: [],
+        referencingLicenseAgreements: [],
+        children: [],
+        itemType: overviewEditorHeaders.FEATURE_GROUP
+    });
 
 export const FeatureGroupPostFactory = new Factory()
-	.extend('FeatureGroupExtendedBaseFactory')
-	.attrs({
-		addedLicenseKeyGroupsIds: [],
-		addedEntitlementPoolsIds: []
-	});
+    .extend('FeatureGroupExtendedBaseFactory')
+    .attrs({
+        addedLicenseKeyGroupsIds: [],
+        addedEntitlementPoolsIds: []
+    });
 
 export const FeatureGroupPutFactory = new Factory()
-	.extend('FeatureGroupExtendedBaseFactory')
-	.attrs({
-		addedLicenseKeyGroupsIds: [],
-		addedEntitlementPoolsIds: [],
-		removedLicenseKeyGroupsIds: [],
-		removedEntitlementPoolsIds: []
-	});
+    .extend('FeatureGroupExtendedBaseFactory')
+    .attrs({
+        addedLicenseKeyGroupsIds: [],
+        addedEntitlementPoolsIds: [],
+        removedLicenseKeyGroupsIds: [],
+        removedEntitlementPoolsIds: []
+    });
diff --git a/openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js b/openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js
index dc71237..b42b03e 100644
--- a/openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js
+++ b/openecomp-ui/test-utils/factories/licenseModel/LicenseKeyGroupFactories.js
@@ -1,5 +1,5 @@
 /*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,37 +13,39 @@
  * or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
-import {Factory} from 'rosie';
-import {overviewEditorHeaders} from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';
+import { Factory } from 'rosie';
+import { overviewEditorHeaders } from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';
 
-Factory.define('LicenseKeyGroupBaseFactory')
-	.attrs({
-		name: 'License Key Group',
-		description: 'wewe',
-		type: 'Unique'
-	});
+Factory.define('LicenseKeyGroupBaseFactory').attrs({
+    manufacturerReferenceNumber: '1231322',
+    name: 'License Key Group',
+    description: 'wewe',
+    type: 'Unique'
+});
 
 export const LicenseKeyGroupListItemFactory = new Factory()
-	.extend('LicenseKeyGroupBaseFactory')
-	.attrs({
-		id: () => Math.floor(Math.random() * (1000 - 1) + 1),
-		itemType: overviewEditorHeaders.LICENSE_KEY_GROUP
-	});
+    .extend('LicenseKeyGroupBaseFactory')
+    .attrs({
+        id: () => Math.floor(Math.random() * (1000 - 1) + 1),
+        versionUUID: () => Math.floor(Math.random() * (1000 - 1) + 1),
+        itemType: overviewEditorHeaders.LICENSE_KEY_GROUP
+    });
 
 export const LicenseKeyGroupStoreFactory = new Factory()
-	.extend('LicenseKeyGroupBaseFactory')
-	.attrs({
-		id: () => Math.floor(Math.random() * (1000 - 1) + 1),
-		referencingFeatureGroups: []
-	});
+    .extend('LicenseKeyGroupBaseFactory')
+    .attrs({
+        id: () => Math.floor(Math.random() * (1000 - 1) + 1),
+        referencingFeatureGroups: []
+    });
 
 export const LicenseKeyGroupDataListFactory = new Factory()
-	.extend('LicenseKeyGroupBaseFactory')
-	.attrs({
-		id: () => Math.floor(Math.random() * (1000 - 1) + 1),
-		referencingFeatureGroups: [],
-		itemType: overviewEditorHeaders.LICENSE_KEY_GROUP
-	});
+    .extend('LicenseKeyGroupBaseFactory')
+    .attrs({
+        id: () => Math.floor(Math.random() * (1000 - 1) + 1),
+        referencingFeatureGroups: [],
+        itemType: overviewEditorHeaders.LICENSE_KEY_GROUP
+    });
 
-export const LicenseKeyGroupPostFactory = new Factory()
-	.extend('LicenseKeyGroupBaseFactory');
+export const LicenseKeyGroupPostFactory = new Factory().extend(
+    'LicenseKeyGroupBaseFactory'
+);
