diff --git a/openecomp-ui/test/flows/test.js b/openecomp-ui/test/flows/test.js
index 4c5ab78..6e02e54 100644
--- a/openecomp-ui/test/flows/test.js
+++ b/openecomp-ui/test/flows/test.js
@@ -1,30 +1,36 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
+/*!
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
  */
 
-import expect from 'expect';
 import deepFreeze from 'deep-freeze';
 import mockRest from 'test-utils/MockRest.js';
 import store from 'sdc-app/AppStore.js';
 import FlowsActions from 'sdc-app/flows/FlowsActions.js';
 import {enums} from 'sdc-app/flows/FlowsConstants.js';
 
+import {
+	FlowCreateFactory,
+	FlowPostRequestFactory,
+	FlowPostResponseFactory,
+	FlowFetchRequestFactory,
+	FlowFetchResponseFactory,
+	FlowDeleteRequestFactory,
+ 	FlowUpdateRequestFactory } from 'test-utils/factories/flows/FlowsFactories.js';
+
+import {buildFromExistingObject} from 'test-utils/Util.js';
+
 const NEW_FLOW = true;
 
 let assertFlowDataAfterCreateFetchAndUpdate = (data) => {
@@ -33,13 +39,13 @@
 	expect(diagramType).toBe(data.artifactType);
 	let uniqueId = data.uniqueId || `${data.serviceID}.${data.artifactName}`;
 	let index = flowList.findIndex(flow => flow.uniqueId === uniqueId);
-	expect(index).toNotBe(-1);
+	expect(index).not.toBe(-1);
 };
 
 describe('Workflows and Management Flows Module Tests:', function () {
 
 
-	it('empty artifact should open flow creation modal', done => {
+	it('empty artifact should open flow creation modal', () => {
 
 		const artifacts = {};
 
@@ -51,96 +57,30 @@
 			participants: [],
 			serviceID: '1234'
 		});
-		setTimeout(() => {
-			let state = store.getState();
-			expect(state.flows.isDisplayModal).toBe(true);
-			expect(state.flows.isModalInEditMode).toBe(false);
-			done();
-		}, 50);
+		let state = store.getState();
+		expect(state.flows.isDisplayModal).toBe(true);
+		expect(state.flows.isModalInEditMode).toBe(false);
 	});
 
-	it('Close flow details editor modal', done => {
+	it('Close flow details editor modal', () => {
 		deepFreeze(store.getState());
 		FlowsActions.closeFlowDetailsEditor(store.dispatch);
-		setTimeout(() => {
-			let state = store.getState();
-			expect(state.flows.isDisplayModal).toBe(false);
-			expect(state.flows.isModalInEditMode).toBe(false);
-			done();
-		}, 50);
+		let state = store.getState();
+		expect(state.flows.isDisplayModal).toBe(false);
+		expect(state.flows.isModalInEditMode).toBe(false);
 	});
 
-	it('Get Flows List from loaded artifact', done => {
+	it('Get Flows List from loaded artifact', () => {
 
 		deepFreeze(store.getState());
 
 		const artifacts = {
-			'test1': {
-				'uniqueId': '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.test1',
-				'artifactType': 'NETWORK_CALL_FLOW',
-				'artifactName': 'test1',
-				'artifactChecksum': 'MzYxZGIyNjlkNjRmMTM4ZWMxM2FjNDUyNDQwMTI3NzM=',
-				'attUidLastUpdater': 'cs0008',
-				'updaterFullName': 'Carlos Santana',
-				'creationDate': 1468164899724,
-				'lastUpdateDate': 1468164899724,
-				'esId': '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.test1',
-				'artifactLabel': 'test1',
-				'artifactCreator': 'cs0008',
-				'description': 'www',
-				'mandatory': false,
-				'artifactDisplayName': 'test1',
-				'serviceApi': false,
-				'artifactGroupType': 'INFORMATIONAL',
-				'timeout': 0,
-				'artifactVersion': '1',
-				'artifactUUID': '28d4cb95-bb46-4666-b858-e333671e6444',
-				'payloadUpdateDate': 1468164900232
-			},
-			'kukuriku': {
-				'uniqueId': '0280b577-2c7b-426e-b7a2-f0dc16508c37.kukuriku',
+			'test1': FlowPostResponseFactory.build({artifactName: 'test1'}),
+			'kukuriku': FlowPostResponseFactory.build({
 				'artifactType': 'PUPPET',
-				'artifactName': 'fuel.JPG',
-				'artifactChecksum': 'OWEyYTVjMWFiNWQ4ZDIwZDUxYTE3Y2EzZmI3YTYyMjA=',
-				'attUidLastUpdater': 'cs0008',
-				'updaterFullName': 'Carlos Santana',
-				'creationDate': 1467877631512,
-				'lastUpdateDate': 1467877631512,
-				'esId': '0280b577-2c7b-426e-b7a2-f0dc16508c37.kukuriku',
-				'artifactLabel': 'kukuriku',
-				'artifactCreator': 'cs0008',
-				'description': 'asdfasdf',
-				'mandatory': false,
-				'artifactDisplayName': 'kukuriku',
-				'serviceApi': false,
-				'artifactGroupType': 'INFORMATIONAL',
-				'timeout': 0,
-				'artifactVersion': '1',
-				'artifactUUID': 'c1e98336-03f4-4b2a-b6a5-08eca44fe3c4',
-				'payloadUpdateDate': 1467877632722
-			},
-			'test3': {
-				'uniqueId': '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.test3',
-				'artifactType': 'NETWORK_CALL_FLOW',
-				'artifactName': 'test3',
-				'artifactChecksum': 'ZmJkZGU1M2M2ZWUxZTdmNGU5NTNiNTdiYTAzMmM1YzU=',
-				'attUidLastUpdater': 'cs0008',
-				'updaterFullName': 'Carlos Santana',
-				'creationDate': 1468165068570,
-				'lastUpdateDate': 1468165128827,
-				'esId': '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.test3',
-				'artifactLabel': 'test3',
-				'artifactCreator': 'cs0008',
-				'description': '333',
-				'mandatory': false,
-				'artifactDisplayName': 'test3',
-				'serviceApi': false,
-				'artifactGroupType': 'INFORMATIONAL',
-				'timeout': 0,
-				'artifactVersion': '2',
-				'artifactUUID': '0988027c-d19c-43db-8315-2c68fc773775',
-				'payloadUpdateDate': 1468165129335
-			}
+				'artifactName': 'kukuriku',
+			}),
+			'test3': FlowPostResponseFactory.build({artifactName: 'test3'})
 		};
 
 		const artifactsArray = Object.keys(artifacts).map(artifact => artifact);
@@ -157,41 +97,25 @@
 		};
 		FlowsActions.fetchFlowArtifacts(store.dispatch, actionData);
 
-		setTimeout(() => {
-			let state = store.getState();
-			expect(state.flows.isDisplayModal).toBe(false);
-			expect(state.flows.isModalInEditMode).toBe(false);
-			expect(state.flows.flowList.length).toEqual(artifactsArray.length);
-			expect(state.flows.flowParticipants).toEqual(actionData.participants);
-			expect(state.flows.serviceID).toBe(actionData.serviceID);
-			expect(state.flows.diagramType).toBe(actionData.diagramType);
-			done();
-		}, 50);
+		let state = store.getState();
+		expect(state.flows.isDisplayModal).toBe(false);
+		expect(state.flows.isModalInEditMode).toBe(false);
+		expect(state.flows.flowList.length).toEqual(artifactsArray.length);
+		expect(state.flows.flowParticipants).toEqual(actionData.participants);
+		expect(state.flows.serviceID).toBe(actionData.serviceID);
+		expect(state.flows.diagramType).toBe(actionData.diagramType);
 
 	});
 
 
-	it('Add New Flow', done => {
+	it('Add New Flow', () => {
 
 		deepFreeze(store.getState());
 
-		const flowCreateData = deepFreeze({
-			artifactName: 'zizizi',
-			artifactType: 'WORKFLOW',
-			description: 'aslkjdfl asfdasdf',
-			serviceID: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b',
-		});
+		const flowCreateData = FlowCreateFactory.build();
+		let expectedDataToBeSentInTheRequest = buildFromExistingObject(FlowPostRequestFactory, flowCreateData);
 
-
-		let expectedDataToBeSentInTheRequest = {
-			artifactGroupType: 'INFORMATIONAL',
-			artifactLabel: 'zizizi',
-			artifactName: 'zizizi',
-			artifactType: 'WORKFLOW',
-			description: 'aslkjdfl asfdasdf',
-			payloadData: 'eyJWRVJTSU9OIjp7Im1ham9yIjoxLCJtaW5vciI6MH0sImRlc2NyaXB0aW9uIjoiYXNsa2pkZmwgYXNmZGFzZGYifQ=='
-		};
-		mockRest.addHandler('create', ({data, baseUrl, options}) => {
+		mockRest.addHandler('post', ({data, baseUrl, options}) => {
 			expect(baseUrl).toBe(`/sdc1/feProxy/rest/v1/catalog/services/${flowCreateData.serviceID}/artifacts/`);
 			expect(data.artifactLabel).toBe(expectedDataToBeSentInTheRequest.artifactLabel);
 			expect(data.artifactName).toBe(expectedDataToBeSentInTheRequest.artifactName);
@@ -199,299 +123,65 @@
 			expect(data.description).toBe(expectedDataToBeSentInTheRequest.description);
 			expect(data.payloadData).toBe(expectedDataToBeSentInTheRequest.payloadData);
 			expect(options.md5).toBe(true);
-			return {
-				artifactChecksum: 'NjBmYjc4NGM5MWIwNmNkMDhmMThhMDAwYmQxYjBiZTU=',
-				artifactCreator: 'cs0008',
-				artifactDisplayName: 'zizizi',
-				artifactGroupType: 'INFORMATIONAL',
-				artifactLabel: 'zizizi',
-				artifactName: 'zizizi',
-				artifactType: 'WORKFLOW',
-				artifactUUID: '0295a7cc-8c02-4105-9d7e-c30ce67ecd07',
-				artifactVersion: '1',
-				attUidLastUpdater: 'cs0008',
-				creationDate: 1470144601623,
-				description: 'aslkjdfl asfdasdf',
-				esId: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-				lastUpdateDate: 1470144601623,
-				mandatory: false,
-				payloadUpdateDate: 1470144602131,
-				serviceApi: false,
-				timeout: 0,
-				uniqueId: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-				updaterFullName: 'Carlos Santana',
-			};
+			return buildFromExistingObject(FlowPostResponseFactory, expectedDataToBeSentInTheRequest);
 		});
 
-		FlowsActions.createOrUpdateFlow(store.dispatch, {flow: flowCreateData}, NEW_FLOW);
-
-		setTimeout(() => {
+		return FlowsActions.createOrUpdateFlow(store.dispatch, {flow: flowCreateData}, NEW_FLOW).then(() => {
 			assertFlowDataAfterCreateFetchAndUpdate(flowCreateData);
-			done();
-		}, 50);
+		});
+
+		
 	});
 
-	it('Fetch Flow', done => {
+	it('Fetch Flow', () => {
 
 		deepFreeze(store.getState());
 
-		const flowFetchData = {
-			artifactName: 'zizizi',
-			artifactType: 'WORKFLOW',
-			description: 'aslkjdfl asfdasdf',
-			serviceID: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b',
-			uniqueId: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-			participants: []
-		};
+		const flowFetchData = FlowFetchRequestFactory.build();
 
 		mockRest.addHandler('fetch', ({baseUrl}) => {
 			//sdc1/feProxy/rest/v1/catalog/services/338d75f0-aec8-4eb4-89c9-8733fcd9bf3b/artifacts/338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi
 			expect(baseUrl).toBe(`/sdc1/feProxy/rest/v1/catalog/services/${flowFetchData.serviceID}/artifacts/${flowFetchData.uniqueId}`);
-			return {
-				artifactName: 'zizizi',
-				base64Contents: 'eyJWRVJTSU9OIjp7Im1ham9yIjoxLCJtaW5vciI6MH0sImRlc2NyaXB0aW9uIjoiYXNsa2pkZmwgYXNmZGFzZGYifQ=='
-			};
+			return buildFromExistingObject(FlowFetchResponseFactory, flowFetchData);
 		});
 
-		FlowsActions.fetchArtifact(store.dispatch, {flow: flowFetchData});
-
-		setTimeout(() => {
+		return FlowsActions.fetchArtifact(store.dispatch, {flow: flowFetchData}).then(() => {
 			assertFlowDataAfterCreateFetchAndUpdate(flowFetchData);
-			done();
-		}, 50);
+		});
 	});
 
-	it('Update Existing Flow', done => {
+	it('Update Existing Flow', () => {
 
 		deepFreeze(store.getState());
+		const flowUpdateData = FlowUpdateRequestFactory.build();
 
-		const flowUpdateData = {
-			'artifactType': 'WORKFLOW',
-			'participants': [
-				{
-					'id': '1',
-					'name': 'Customer'
-				},
-				{
-					'id': '2',
-					'name': 'CCD'
-				},
-				{
-					'id': '3',
-					'name': 'Infrastructure'
-				},
-				{
-					'id': '4',
-					'name': 'MSO'
-				},
-				{
-					'id': '5',
-					'name': 'SDN-C'
-				},
-				{
-					'id': '6',
-					'name': 'A&AI'
-				},
-				{
-					'id': '7',
-					'name': 'APP-C'
-				},
-				{
-					'id': '8',
-					'name': 'Cloud'
-				},
-				{
-					'id': '9',
-					'name': 'DCAE'
-				},
-				{
-					'id': '10',
-					'name': 'ALTS'
-				},
-				{
-					'id': '11',
-					'name': 'VF'
-				}
-			],
-			'serviceID': '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b',
-			'artifactDisplayName': 'zizizi',
-			'artifactGroupType': 'INFORMATIONAL',
-			'uniqueId': '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-			'artifactName': 'zizizi',
-			'artifactLabel': 'zizizi',
-			'artifactUUID': '0295a7cc-8c02-4105-9d7e-c30ce67ecd07',
-			'artifactVersion': '1',
-			'creationDate': 1470144601623,
-			'lastUpdateDate': 1470144601623,
-			'description': 'aslkjdfl asfdasdf',
-			'mandatory': false,
-			'timeout': 0,
-			'esId': '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-			'artifactChecksum': 'NjBmYjc4NGM5MWIwNmNkMDhmMThhMDAwYmQxYjBiZTU=',
-			'heatParameters': [],
-			'sequenceDiagramModel': {
-				'diagram': {
-					'metadata': {
-						'id': '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-						'name': 'zizizi',
-						'ref': 'BLANK'
-					},
-					'lifelines': [
-						{
-							'id': '1',
-							'name': 'Customer',
-							'index': 1,
-							'x': 175
-						},
-						{
-							'id': '2',
-							'name': 'CCD',
-							'index': 2,
-							'x': 575
-						},
-						{
-							'id': '3',
-							'name': 'Infrastructure',
-							'index': 3,
-							'x': 975
-						},
-						{
-							'id': '4',
-							'name': 'MSO',
-							'index': 4,
-							'x': 1375
-						},
-						{
-							'id': '5',
-							'name': 'SDN-C',
-							'index': 5,
-							'x': 1775
-						},
-						{
-							'id': '6',
-							'name': 'A&AI',
-							'index': 6,
-							'x': 2175
-						},
-						{
-							'id': '7',
-							'name': 'APP-C',
-							'index': 7,
-							'x': 2575
-						},
-						{
-							'id': '8',
-							'name': 'Cloud',
-							'index': 8,
-							'x': 2975
-						},
-						{
-							'id': '9',
-							'name': 'DCAE',
-							'index': 9,
-							'x': 3375
-						},
-						{
-							'id': '10',
-							'name': 'ALTS',
-							'index': 10,
-							'x': 3775
-						},
-						{
-							'id': '11',
-							'name': 'VF',
-							'index': 11,
-							'x': 4175
-						}
-					],
-					'steps': [
-						{
-							'message': {
-								'id': '9377-5036-c011-cb95-3a8b-82c6-bbb5-bc84',
-								'name': '[Unnamed Message]',
-								'type': 'request',
-								'from': '1',
-								'to': '2',
-								'index': 1
-							}
-						},
-						{
-							'message': {
-								'id': '64c4-4fd1-b1da-4355-a060-6e48-ee47-c85c',
-								'name': '[Unnamed Message]',
-								'type': 'request',
-								'from': '1',
-								'to': '2',
-								'index': 2
-							}
-						}
-					]
-				}
-			}
-		};
-
-		mockRest.addHandler('create', ({baseUrl}) => {
+		mockRest.addHandler('post', ({baseUrl}) => {
 			expect(baseUrl).toBe(`/sdc1/feProxy/rest/v1/catalog/services/${flowUpdateData.serviceID}/artifacts/${flowUpdateData.uniqueId}`);
 
-			return {
-				artifactChecksum: 'MmE5MWJmN2ZlN2FhM2JhMzA0NGQ1ODMyOWFhNWI0NDA=',
-				artifactCreator: 'cs0008',
-				artifactDisplayName: 'zizizi',
-				artifactGroupType: 'INFORMATIONAL',
-				artifactLabel: 'zizizi',
-				artifactName: 'zizizi',
-				artifactType: 'WORKFLOW',
-				artifactUUID: '3319335b-969e-4d72-b5a2-409645de6d64',
-				artifactVersion: '3',
-				attUidLastUpdater: 'cs0008',
-				creationDate: 1470144601623,
-				description: 'aslkjdfl asfdasdf',
-				esId: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-				lastUpdateDate: 1470208425904,
-				mandatory: false,
-				payloadUpdateDate: 1470208426424,
-				serviceApi: false,
-				timeout: 0,
-				uniqueId: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-				updaterFullName: 'Carlos Santana'
-			};
+			return buildFromExistingObject(FlowPostResponseFactory, flowUpdateData);
 		});
 
-		FlowsActions.createOrUpdateFlow(store.dispatch, {flow: flowUpdateData}, !NEW_FLOW);
-
-		setTimeout(() => {
+		return FlowsActions.createOrUpdateFlow(store.dispatch, {flow: flowUpdateData}, !NEW_FLOW).then(() => {
 			assertFlowDataAfterCreateFetchAndUpdate(flowUpdateData);
-			done();
-		}, 50);
+		});
+
 	});
 
-	it('Delete Flow', done => {
+	it('Delete Flow', () => {
 
 		deepFreeze(store.getState());
 
-		const flowDeleteData = deepFreeze({
-			artifactName: 'zizizi',
-			artifactType: 'WORKFLOW',
-			description: 'aslkjdfl asfdasdf',
-			serviceID: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b',
-			uniqueId: '338d75f0-aec8-4eb4-89c9-8733fcd9bf3b.zizizi',
-			participants: []
-		});
+		const flowDeleteData = FlowDeleteRequestFactory.build();
 
 		mockRest.addHandler('destroy', ({baseUrl}) => {
 			expect(baseUrl).toBe(`/sdc1/feProxy/rest/v1/catalog/services/${flowDeleteData.serviceID}/artifacts/${flowDeleteData.uniqueId}`);
 			return {};
 		});
 
-		FlowsActions.deleteFlow(store.dispatch, {flow: flowDeleteData});
-
-		setTimeout(() => {
+		return FlowsActions.deleteFlow(store.dispatch, {flow: flowDeleteData}).then(() => {
 			let {flowList} = store.getState().flows;
 			let index = flowList.findIndex(flow => flow.uniqueId === flowDeleteData.uniqueId);
 			expect(index).toBe(-1);
-			done();
-		}, 50);
+		});
 	});
-
 });
-
