diff --git a/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js b/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js
index 9ab1813..8f2b7e7 100644
--- a/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js
+++ b/openecomp-ui/test/nfvo-components/panel/VersionController/versionController.test.js
@@ -1,43 +1,152 @@
-/*-
- * ============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 React from 'react';
+
 import TestUtils from 'react-addons-test-utils';
+import {mount} from 'enzyme';
 import VersionController from 'nfvo-components/panel/versionController/VersionController.jsx';
-import {actionsEnum} from 'nfvo-components/panel/versionController/VersionControllerConstants.js';
+import {actionsEnum, statusEnum} from 'nfvo-components/panel/versionController/VersionControllerConstants.js';
+import {scryRenderedDOMComponentsWithTestId} from 'test-utils/Util.js';
+import {VSPComponentsVersionControllerFactory} from 'test-utils/factories/softwareProduct/SoftwareProductComponentsNetworkFactories.js';
 
 describe('versionController UI Component', () => {
+	let onSave, onClose, onVersionSwitching = onSave = onClose = () => {return Promise.resolve();};
+	const versionData = VSPComponentsVersionControllerFactory.build();
+	const isFormDataValid = true;
+	const viewableVersions = versionData.viewableVersions;
+	const version = versionData.version;
+	const props = {onSave, onClose, isFormDataValid, viewableVersions, version, onVersionSwitching};
 
 	it('function does exist', () => {
 		var renderer = TestUtils.createRenderer();
-		renderer.render(<VersionController isCheckedOut={false} status={'OUT'} />);
+		renderer.render(<VersionController isCheckedOut={false} status={statusEnum.CHECK_OUT_STATUS} {...props} />);
 		var renderedOutput = renderer.getRenderOutput();
-		expect(renderedOutput).toExist();
+		expect(renderedOutput).toBeTruthy();
 	});
 
 	it('validating checkin function', () => {
-
-		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={false} status={'OUT'} onSave={()=>{return Promise.resolve();}}/>);
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={true} status={statusEnum.CHECK_OUT_STATUS} {...props} />);
 		let cb = action => expect(action).toBe(actionsEnum.CHECK_IN);
 		versionController.checkin(cb);
+	});
+
+	it('validating checkout function', () => {
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={false} status={statusEnum.CHECK_IN_STATUS} {...props} />);
+		let cb = action => expect(action).toBe(actionsEnum.CHECK_OUT);
+		versionController.checkout(cb);
+	});
+
+	it('validating submit function', () => {
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={false} status={statusEnum.CHECK_IN_STATUS} {...props} />);
+		let cb = action => expect(action).toBe(actionsEnum.SUBMIT);
+		versionController.submit(cb);
+	});
+
+	it('validating revert function', () => {
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={true} status={statusEnum.CHECK_OUT_STATUS} {...props} />);
+		let cb = action => expect(action).toBe(actionsEnum.UNDO_CHECK_OUT);
+		versionController.revertCheckout(cb);
+	});
+
+	it('does not show the save button when no onSave available', () => {
+		let noSaveProps = {...props, onSave: null };
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={true} status={statusEnum.CHECK_OUT_STATUS} {...noSaveProps} />);
+		let elem = scryRenderedDOMComponentsWithTestId(versionController,'vc-save-btn');
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(0);
+	});
+
+	it('does not show the submit button when no callVCAction available', () => {
+		let callVCActionProps = {...props, callVCAction: null};
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={false} status={statusEnum.CHECK_IN_STATUS} {...callVCActionProps} />);
+		let elem = scryRenderedDOMComponentsWithTestId(versionController,'vc-submit-btn');
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(0);
+	});
+
+	it('does not show the revert button when no callVCAction available', () => {
+		let callVCActionProps = {...props, callVCAction: null};
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={true} status={statusEnum.CHECK_OUT_STATUS} {...callVCActionProps} />);
+		let elem = scryRenderedDOMComponentsWithTestId(versionController,'vc-revert-btn');
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(0);
+	});
+
+	it('Shows the save button when onSave available', () => {
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={true} status={statusEnum.CHECK_OUT_STATUS} {...props} />);
+		let elem = scryRenderedDOMComponentsWithTestId(versionController,'vc-save-btn');
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(1);
+	});
+
+	it('Shows the submit button when callVCAction available', () => {
+		let callVCActionProps = { ...props, callVCAction: function(){} };
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={false} status={statusEnum.CHECK_IN_STATUS} {...callVCActionProps} />);
+		let elem = scryRenderedDOMComponentsWithTestId(versionController,'vc-submit-btn');
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(1);
+	});
+
+	it('Shows the revert button when callVCAction available', () => {
+		let callVCActionProps = { ...props, callVCAction: function(){} };
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={true} status={statusEnum.CHECK_OUT_STATUS} {...callVCActionProps} />);
+		let elem = scryRenderedDOMComponentsWithTestId(versionController,'vc-revert-btn');
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(1);
+	});
+
+	it('Shows the checkin button', () => {
+		let callVCActionProps = { ...props, callVCAction: function(){} };
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={true} status={statusEnum.CHECK_OUT_STATUS} {...callVCActionProps} />);
+		let elem = scryRenderedDOMComponentsWithTestId(versionController,'vc-checkout-btn');
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(1);
+	});
+
+	it('Shows the checkout button', () => {
+		let callVCActionProps = { ...props, callVCAction: function(){} };
+		let versionController = TestUtils.renderIntoDocument(<VersionController isCheckedOut={false} status={statusEnum.CHECK_IN_STATUS} {...callVCActionProps} />);
+		let elem = scryRenderedDOMComponentsWithTestId(versionController,'vc-checkout-btn');
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(1);
+
+	});
+
+	it('Doesn\'t show the checkin button for prev version', () => {
+		let callVCActionProps = { ...props, version: '1.0', callVCAction: function(){} };
+		let versionController = mount(<VersionController isCheckedOut={true} status={statusEnum.CHECK_OUT_STATUS} {...callVCActionProps} />);
+		let elem = versionController.find('[data-test-id="vc-checkout-btn"]');
+		let svgIcon = versionController.find('.version-controller-lock-closed');
+
+		expect(elem).toBeTruthy();
+		expect(elem.length).toEqual(1);
+		expect(svgIcon.hasClass('disabled')).toBe(true);
+	});
+
+	it('Doesn\'t show the checkout button', () => {
+		let callVCActionProps = { ...props, version: '1.0', callVCAction: function(){} };
+		let versionController = mount(<VersionController isCheckedOut={false} status={statusEnum.CHECK_IN_STATUS} {...callVCActionProps} />);
+		let elem = versionController.find('[data-test-id="vc-checkout-btn"]');
+		let svgIcon = versionController.find('.version-controller-lock-closed');
+
+		expect(elem).toBeTruthy();
+		expect(elem.length).toBe(1);
+		expect(svgIcon.hasClass('disabled')).toBe(true);
 
 	});
 
diff --git a/openecomp-ui/test/nfvo-components/panel/VersionController/versionControllerUtils.test.js b/openecomp-ui/test/nfvo-components/panel/VersionController/versionControllerUtils.test.js
index 0e4a921..d654e16 100644
--- a/openecomp-ui/test/nfvo-components/panel/VersionController/versionControllerUtils.test.js
+++ b/openecomp-ui/test/nfvo-components/panel/VersionController/versionControllerUtils.test.js
@@ -1,41 +1,38 @@
-/*-
- * ============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 Configuration from 'sdc-app/config/Configuration.js';
 import VersionControllerUtils from 'nfvo-components/panel/versionController/VersionControllerUtils.js';
 import {statusEnum} from 'nfvo-components/panel/versionController/VersionControllerConstants.js';
+import VersionControllerUtilsFactory from 'test-utils/factories/softwareProduct/VersionControllerUtilsFactory.js';
 
 const status = 'testStatus';
+const {lockingUser: currentUser, viewableVersions: defaultVersions} = VersionControllerUtilsFactory.build();
 
 describe('versionController UI Component', () => {
 
 	it('function does exist', () => {
-		expect(VersionControllerUtils).toExist();
+		expect(VersionControllerUtils).toBeTruthy();
 	});
 
 	it('validating getCheckOutStatusKindByUserID - without "UserID"', () => {
 		var result = VersionControllerUtils.getCheckOutStatusKindByUserID(status);
 		expect(result.status).toBe(status);
-		expect(result.isCheckedOut).toBe(true);
+		expect(result.isCheckedOut).toBe(false);
 	});
 
 	it('validating getCheckOutStatusKindByUserID - without "UserID" with locking user', () => {
@@ -45,12 +42,11 @@
 	});
 
 	it('validating getCheckOutStatusKindByUserID - with "UserID" with configuration set', () => {
-		const userId = 'att';
+		const Uid = 'ecomp';
 
-		Configuration.set('ATTUserID', userId);
-		var result = VersionControllerUtils.getCheckOutStatusKindByUserID(status, userId);
-		Configuration.set('ATTUserID', undefined);
-
+		Configuration.set('UserID', Uid);
+		var result = VersionControllerUtils.getCheckOutStatusKindByUserID(status, Uid);
+		Configuration.set('UserID', undefined);
 		expect(result.status).toBe(status);
 		expect(result.isCheckedOut).toBe(true);
 	});
@@ -58,48 +54,31 @@
 
 
 	it('validating isCheckedOutByCurrentUser - when resource is not checked out', () => {
-		const currentUser = 'current';
-		const resource = deepFreeze({
-			version: '0.6',
-			viewableVersions: ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6'],
-			status: 'Final'
-		});
+		const resource = VersionControllerUtilsFactory.build({status: statusEnum.SUBMIT_STATUS});
 
-		Configuration.set('ATTUserID', currentUser);
+		Configuration.set('UserID', currentUser);
 		const result = VersionControllerUtils.isCheckedOutByCurrentUser(resource);
-		Configuration.set('ATTUserID', undefined);
+		Configuration.set('UserID', undefined);
 
 		expect(result).toBe(false);
 	});
 
 	it('validating isCheckedOutByCurrentUser - when resource is checked out', () => {
-		const currentUser = 'current';
-		const resource = deepFreeze({
-			version: '0.6',
-			viewableVersions: ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6'],
-			status: 'Locked',
-			lockingUser: 'current'
-		});
+		const resource = VersionControllerUtilsFactory.build();
 
-		Configuration.set('ATTUserID', currentUser);
+		Configuration.set('UserID', currentUser);
 		const result = VersionControllerUtils.isCheckedOutByCurrentUser(resource);
-		Configuration.set('ATTUserID', undefined);
+		Configuration.set('UserID', undefined);
 
 		expect(result).toBe(true);
 	});
 
 	it('validating isCheckedOutByCurrentUser - when resource is checked out by another user', () => {
-		const currentUser = 'current';
-		const resource = deepFreeze({
-			version: '0.6',
-			viewableVersions: ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6'],
-			status: 'Locked',
-			lockingUser: 'another'
-		});
+		const resource = VersionControllerUtilsFactory.build({lockingUser: 'another'});
 
-		Configuration.set('ATTUserID', currentUser);
+		Configuration.set('UserID', currentUser);
 		const result = VersionControllerUtils.isCheckedOutByCurrentUser(resource);
-		Configuration.set('ATTUserID', undefined);
+		Configuration.set('UserID', undefined);
 
 		expect(result).toBe(false);
 	});
@@ -107,66 +86,43 @@
 
 
 	it('validating isReadOnly - when resource is not checked out', () => {
-		const currentUser = 'current';
-		const resource = deepFreeze({
-			version: '0.6',
-			viewableVersions: ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6'],
-			status: 'Final'
-		});
+		const resource = VersionControllerUtilsFactory.build({status: statusEnum.SUBMIT_STATUS});
 
-		Configuration.set('ATTUserID', currentUser);
+		Configuration.set('UserID', currentUser);
 		const result = VersionControllerUtils.isReadOnly(resource);
-		Configuration.set('ATTUserID', undefined);
+		Configuration.set('UserID', undefined);
 
 		expect(result).toBe(true);
 	});
 
 	it('validating isReadOnly - when resource is checked out', () => {
-		const currentUser = 'current';
-		const resource = deepFreeze({
-			version: '0.6',
-			viewableVersions: ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6'],
-			status: 'Locked',
-			lockingUser: 'current'
-		});
+		const resource = VersionControllerUtilsFactory.build();
 
-		Configuration.set('ATTUserID', currentUser);
+		Configuration.set('UserID', currentUser);
 		const result = VersionControllerUtils.isReadOnly(resource);
-		Configuration.set('ATTUserID', undefined);
+		Configuration.set('UserID', undefined);
 
 		expect(result).toBe(false);
 	});
 
 	it('validating isReadOnly - when version of resource is not latest', () => {
-		const currentUser = 'current';
-		const resource = deepFreeze({
-			version: '0.2',
-			viewableVersions: ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6'],
-			status: 'Locked',
-			lockingUser: 'current'
-		});
 
-		Configuration.set('ATTUserID', currentUser);
+		const resource = VersionControllerUtilsFactory.build({version: defaultVersions[defaultVersions.length - 2]});
+
+		Configuration.set('UserID', currentUser);
 		const result = VersionControllerUtils.isReadOnly(resource);
-		Configuration.set('ATTUserID', undefined);
+		Configuration.set('UserID', undefined);
 
 		expect(result).toBe(true);
 	});
 
 	it('validating isReadOnly - when resource is checked out by another user', () => {
-		const currentUser = 'current';
-		const resource = deepFreeze({
-			version: '0.6',
-			viewableVersions: ['0.1', '0.2', '0.3', '0.4', '0.5', '0.6'],
-			status: 'Locked',
-			lockingUser: 'another'
-		});
+		const resource = VersionControllerUtilsFactory.build({lockingUser: 'another'});
 
-		Configuration.set('ATTUserID', currentUser);
+		Configuration.set('UserID', currentUser);
 		const result = VersionControllerUtils.isReadOnly(resource);
-		Configuration.set('ATTUserID', undefined);
+		Configuration.set('UserID', undefined);
 
 		expect(result).toBe(true);
 	});
 });
-
