diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
index 130cc69..978adf4 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml
@@ -1,7 +1,10 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
+    <name>openecomp-sdc-versioning-api</name>
+    <artifactId>openecomp-sdc-versioning-api</artifactId>
     <parent>
         <groupId>org.openecomp.sdc</groupId>
         <artifactId>openecomp-sdc-lib</artifactId>
@@ -9,22 +12,19 @@
         <relativePath>../..</relativePath>
     </parent>
 
-    <artifactId>openecomp-sdc-versioning-api</artifactId>
-    <name>openecomp-sdc-versioning-api</name>
-
     <dependencies>
         <dependency>
-            <groupId>org.openecomp.sdc</groupId>
+            <groupId>org.openecomp.core</groupId>
             <artifactId>openecomp-facade-core</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.openecomp.sdc</groupId>
+            <groupId>org.openecomp.core</groupId>
             <artifactId>openecomp-facade-api</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.openecomp.sdc</groupId>
+            <groupId>org.openecomp.core</groupId>
             <artifactId>openecomp-nosqldb-core</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -41,13 +41,13 @@
         <dependency>
             <groupId>org.glassfish.web</groupId>
             <artifactId>javax.el</artifactId>
-            <version>2.2.4</version>
+            <version>${javax.el.version}</version>
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
             <scope>test</scope>
-            <version>1.10.19</version>
+            <version>${mockito.all.version}</version>
         </dependency>
         <dependency>
             <groupId>org.testng</groupId>
@@ -65,7 +65,12 @@
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
-            <version>RELEASE</version>
+            <version>4.11</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdc</groupId>
+            <artifactId>openecomp-sdc-logging-core</artifactId>
+            <version>${project.version}</version>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml.versionsBackup b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml.versionsBackup
new file mode 100644
index 0000000..3c9a34a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/pom.xml.versionsBackup
@@ -0,0 +1,75 @@
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <name>openecomp-sdc-versioning-api</name>
+    <artifactId>openecomp-sdc-versioning-api</artifactId>
+    <parent>
+        <groupId>org.openecomp.sdc</groupId>
+        <artifactId>openecomp-sdc-lib</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.openecomp.core</groupId>
+            <artifactId>openecomp-facade-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.core</groupId>
+            <artifactId>openecomp-facade-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.core</groupId>
+            <artifactId>openecomp-nosqldb-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>${hibernate.validator.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.el</groupId>
+            <artifactId>javax.el-api</artifactId>
+            <version>${javax.el-api.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.web</groupId>
+            <artifactId>javax.el</artifactId>
+            <version>2.2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+            <version>1.10.19</version>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <scope>test</scope>
+            <version>6.8.5</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>snakeyaml</artifactId>
+                    <groupId>org.yaml</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+            <version>4.11</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdc</groupId>
+            <artifactId>openecomp-sdc-logging-core</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java
index d51f8c0a..c4479d7 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/VersioningUtil.java
@@ -23,6 +23,7 @@
 import org.openecomp.core.dao.BaseDao;
 import org.openecomp.sdc.common.errors.CoreException;
 import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionStatus;
 import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
 import org.openecomp.sdc.versioning.errors.RequestedVersionInvalidErrorBuilder;
 import org.openecomp.sdc.versioning.errors.VersionableSubEntityNotFoundErrorBuilder;
@@ -47,9 +48,13 @@
    * @param firstClassCitizenType the first class citizen type
    */
   public static <T extends VersionableEntity> void validateEntityExistence(Object retrievedEntity,
-                                                                 T inputEntity,
-                                                                 String firstClassCitizenType) {
+                                                                           T inputEntity,
+                                                                           String firstClassCitizenType) {
     if (retrievedEntity == null) {
+      //MdcDataErrorMessage.createErrorMessageAndUpdateMDC(LoggerServiceName
+      // .getServiceName(LoggerServiceName.Submit_Entity),
+      // LoggerConstants.TARGET_ENTITY_DB, LoggerTragetServiceName.SUBMIT_ENTITY,
+      // ErrorLevel.ERROR.name(), null, LoggerErrorDescription.SUBMIT_ENTITY);
       throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
           inputEntity.getEntityType(),
           inputEntity.getId(),
@@ -84,6 +89,10 @@
     }
 
     if (nonExistingIds.size() > 0) {
+      //MdcDataErrorMessage.createErrorMessageAndUpdateMDC
+      // (LoggerServiceName.getServiceName(LoggerServiceName.Submit_Entity),
+      // LoggerConstants.TARGET_ENTITY_DB, LoggerTragetServiceName.SUBMIT_ENTITY,
+      // ErrorLevel.ERROR.name(), null, LoggerErrorDescription.SUBMIT_ENTITY);
       if (nonExistingIds.size() == 1) {
         throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
             entity.getEntityType(),
@@ -123,6 +132,10 @@
 
     if (nonExistingIds.size() > 0) {
       if (nonExistingIds.size() == 1) {
+        //MdcDataErrorMessage.createErrorMessageAndUpdateMDC(LoggerServiceName
+        // .getServiceName(LoggerServiceName.Submit_Entity), LoggerConstants.TARGET_ENTITY_DB,
+        // LoggerTragetServiceName.ENTIT, ErrorLevel.ERROR.name(),
+        // null, LoggerErrorDescription.SUBMIT_ENTITY);
         throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
             containedEntityType,
             nonExistingIds.get(0),
@@ -130,6 +143,10 @@
             containingEntity.getId(),
             containingEntity.getVersion()).build());
       }
+      //MdcDataErrorMessage.createErrorMessageAndUpdateMDC(LoggerServiceName
+      // .getServiceName(LoggerServiceName.Submit_Entity),
+      // LoggerConstants.TARGET_ENTITY_DB, LoggerTragetServiceName.SUBMIT_ENTITY,
+      // ErrorLevel.ERROR.name(), null, LoggerErrorDescription.SUBMIT_ENTITY);
       throw new CoreException(new VersionableSubEntityNotFoundErrorBuilder(
           containedEntityType,
           nonExistingIds,
@@ -168,19 +185,23 @@
   }
 
   /**
-   * Resolve version version.
+   * Resolve version.
    *
    * @param requestedVersion the requested version
    * @param versionInfo      the version info
    * @return the version
    */
-  public static Version resolveVersion(Version requestedVersion, VersionInfo versionInfo) {
+  public static Version resolveVersion(Version requestedVersion, VersionInfo versionInfo,
+                                       String user) {
     if (requestedVersion == null) {
       requestedVersion = versionInfo.getActiveVersion();
-    } else {
-      if (!versionInfo.getViewableVersions().contains(requestedVersion)) {
-        throw new CoreException(new RequestedVersionInvalidErrorBuilder().build());
-      }
+    }
+    if (versionInfo.getActiveVersion().equals(requestedVersion)
+        && user.equals(versionInfo.getLockingUser())) {
+      requestedVersion.setStatus(VersionStatus.Locked);
+    }
+    if (!versionInfo.getViewableVersions().contains(requestedVersion)) {
+      throw new CoreException(new RequestedVersionInvalidErrorBuilder().build());
     }
     return requestedVersion;
   }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDao.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDao.java
index cb6c050..ca09cdb 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDao.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionInfoDeletedDao.java
@@ -20,7 +20,6 @@
 
 package org.openecomp.sdc.versioning.dao;
 
-
 import org.openecomp.core.dao.BaseDao;
 import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
 
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDao.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDao.java
index 8709a98..9ba042b 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDao.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDao.java
@@ -29,6 +29,8 @@
                    Version baseVersion, Version newVersion);
 
   void deleteVersion(VersionableEntityMetadata versionableTableMetadata, String entityId,
-                     Version versionToDelete);
+                     Version versionToDelete, Version backToVersion);
 
+  void closeVersion(VersionableEntityMetadata versionableTableMetadata, String entityId,
+                    Version versionToClose);
 }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDaoFactory.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDaoFactory.java
index be3c635..870a789 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDaoFactory.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/VersionableEntityDaoFactory.java
@@ -22,10 +22,13 @@
 
 import org.openecomp.core.factory.api.AbstractComponentFactory;
 import org.openecomp.core.factory.api.AbstractFactory;
+import org.openecomp.sdc.versioning.types.VersionableEntityStoreType;
 
 public abstract class VersionableEntityDaoFactory
     extends AbstractComponentFactory<VersionableEntityDao> {
   public static VersionableEntityDaoFactory getInstance() {
     return AbstractFactory.getInstance(VersionableEntityDaoFactory.class);
   }
+
+  public abstract VersionableEntityDao createInterface(VersionableEntityStoreType storeType);
 }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
index e6ac799..f0f67cf 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/Version.java
@@ -20,16 +20,18 @@
 
 package org.openecomp.sdc.versioning.dao.types;
 
+import com.datastax.driver.mapping.annotations.Transient;
 import com.datastax.driver.mapping.annotations.UDT;
 
 @UDT(name = "version", keyspace = "dox")
 public class Version {
-  public static final String VERSION_REGEX = "^\\d+\\.\\d+$";
   public static final String VERSION_STRING_VIOLATION_MSG =
       "Version string must be in the format of: {integer}.{integer}";
 
   private int major;
   private int minor;
+  @Transient
+  private VersionStatus status = VersionStatus.Available;
 
   public Version() {
   }
@@ -56,7 +58,7 @@
     }
     try {
       version = new Version(Integer.parseInt(versionLevels[0]), Integer.parseInt(versionLevels[1]));
-    } catch (Exception exception) {
+    } catch (Exception ex) {
       throw new IllegalArgumentException(VERSION_STRING_VIOLATION_MSG);
     }
 
@@ -79,6 +81,14 @@
     this.minor = minor;
   }
 
+  public VersionStatus getStatus() {
+    return status;
+  }
+
+  public void setStatus(VersionStatus status) {
+    this.status = status;
+  }
+
   public Version calculateNextCandidate() {
     return new Version(major, minor + 1);
   }
@@ -92,6 +102,13 @@
   }
 
   @Override
+  public int hashCode() {
+    int result = major;
+    result = 31 * result + minor;
+    return result;
+  }
+
+  @Override
   public boolean equals(Object obj) {
     if (this == obj) {
       return true;
@@ -101,18 +118,10 @@
     }
 
     Version version = (Version) obj;
-
     return major == version.major && minor == version.minor;
   }
 
   @Override
-  public int hashCode() {
-    int result = major;
-    result = 31 * result + minor;
-    return result;
-  }
-
-  @Override
   public String toString() {
     return major + "." + minor;
   }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionStatus.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionStatus.java
index 1fb6854..cf980d6 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionStatus.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionStatus.java
@@ -24,5 +24,4 @@
   Available,
   Locked,
   Final
-
 }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionType.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionType.java
index 5a395c6..befbae6 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionType.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/dao/types/VersionType.java
@@ -22,5 +22,5 @@
 
 public enum VersionType {
   Draft,
-  Finalized
+  Finalized;
 }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnEntityLockedByOtherErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnEntityLockedByOtherErrorBuilder.java
index 829ce26..f0d8051 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnEntityLockedByOtherErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckinOnEntityLockedByOtherErrorBuilder.java
@@ -20,9 +20,6 @@
 
 package org.openecomp.sdc.versioning.errors;
 
-import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes
-    .CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER;
-
 import org.openecomp.sdc.common.errors.BaseErrorBuilder;
 import org.openecomp.sdc.common.errors.ErrorCategory;
 
@@ -32,8 +29,8 @@
 public class CheckinOnEntityLockedByOtherErrorBuilder extends BaseErrorBuilder {
 
   private static final String CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG =
-      "Can not check in versionable entity %s with id %s since it is "
-          + "checked out by other user: %s.";
+      "Can not check in versionable entity %s with id %s since it is checked out by other "
+          + "user: %s.";
 
   /**
    * Instantiates a new Checkin on entity locked by other error builder.
@@ -44,7 +41,7 @@
    */
   public CheckinOnEntityLockedByOtherErrorBuilder(String entityType, String entityId,
                                                   String lockingUser) {
-    getErrorCodeBuilder().withId(CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER);
+    getErrorCodeBuilder().withId(VersioningErrorCodes.CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER);
     getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
     getErrorCodeBuilder().withMessage(String
         .format(CHECKIN_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG, entityType, entityId, lockingUser));
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilder.java
index 60c0247..9784782 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/CheckoutOnLockedEntityErrorBuilder.java
@@ -29,8 +29,8 @@
 public class CheckoutOnLockedEntityErrorBuilder extends BaseErrorBuilder {
 
   private static final String CHECKOT_ON_LOCKED_ENTITY_MSG =
-      "Can not check out versionable entity %s with id %s since it is "
-          + "checked out by other user: %s.";
+      "Can not check out versionable entity %s with id %s since it is checked out by "
+          + "other user: %s.";
 
   /**
    * Instantiates a new Checkout on locked entity error builder.
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilder.java
index fb61cce..4de5618 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EditOnUnlockedEntityErrorBuilder.java
@@ -20,6 +20,8 @@
 
 package org.openecomp.sdc.versioning.errors;
 
+import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes.EDIT_ON_UNLOCKED_ENTITY;
+
 import org.openecomp.sdc.common.errors.BaseErrorBuilder;
 import org.openecomp.sdc.common.errors.ErrorCategory;
 
@@ -38,7 +40,7 @@
    * @param entityId   the entity id
    */
   public EditOnUnlockedEntityErrorBuilder(String entityType, String entityId) {
-    getErrorCodeBuilder().withId(VersioningErrorCodes.EDIT_ON_UNLOCKED_ENTITY);
+    getErrorCodeBuilder().withId(EDIT_ON_UNLOCKED_ENTITY);
     getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
     getErrorCodeBuilder()
         .withMessage(String.format(EDIT_ON_UNLOCKED_ENTITY_MSG, entityType, entityId));
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyFinalizedErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyFinalizedErrorBuilder.java
index 22643dd..bff3e82 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyFinalizedErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/EntityAlreadyFinalizedErrorBuilder.java
@@ -20,9 +20,6 @@
 
 package org.openecomp.sdc.versioning.errors;
 
-import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes
-    .SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED;
-
 import org.openecomp.sdc.common.errors.BaseErrorBuilder;
 import org.openecomp.sdc.common.errors.ErrorCategory;
 
@@ -41,7 +38,7 @@
    * @param entityId   the entity id
    */
   public EntityAlreadyFinalizedErrorBuilder(String entityType, String entityId) {
-    getErrorCodeBuilder().withId(SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED);
+    getErrorCodeBuilder().withId(VersioningErrorCodes.SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED);
     getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
     getErrorCodeBuilder()
         .withMessage(String.format(SUBMIT_FINALIZED_ENTITY_NOT_ALLOWED_MSG, entityType, entityId));
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/RequestedVersionInvalidErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/RequestedVersionInvalidErrorBuilder.java
index 7d3afcb..d44b2c4 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/RequestedVersionInvalidErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/RequestedVersionInvalidErrorBuilder.java
@@ -37,4 +37,12 @@
     getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
     getErrorCodeBuilder().withMessage(REQUESTED_VERSION_INVALID_MSG);
   }
+
+/*    private static List<String> toStringList(Set<Version> versions) {
+        List<String> versionStrings = new ArrayList<>(versions.size());
+        for (Version version : versions) {
+            versionStrings.add(version.toString());
+        }
+        return versionStrings;
+    }*/
 }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/SubmitLockedEntityNotAllowedErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/SubmitLockedEntityNotAllowedErrorBuilder.java
index 3f4fc81..959c277 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/SubmitLockedEntityNotAllowedErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/SubmitLockedEntityNotAllowedErrorBuilder.java
@@ -29,8 +29,8 @@
 public class SubmitLockedEntityNotAllowedErrorBuilder extends BaseErrorBuilder {
 
   private static final String SUBMIT_LOCKED_ENTITY_NOT_ALLOWED_MSG =
-      "Versionable entity %s with id %s can not be submitted since it is currently "
-          + "locked by user %s.";
+      "Versionable entity %s with id %s can not be submitted since it is currently"
+          + " locked by user %s.";
 
   /**
    * Instantiates a new Submit locked entity not allowed error builder.
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilder.java
index 5e2be13..2b90338 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnEntityLockedByOtherErrorBuilder.java
@@ -20,9 +20,6 @@
 
 package org.openecomp.sdc.versioning.errors;
 
-import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes
-    .UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER;
-
 import org.openecomp.sdc.common.errors.BaseErrorBuilder;
 import org.openecomp.sdc.common.errors.ErrorCategory;
 
@@ -32,8 +29,8 @@
 public class UndoCheckoutOnEntityLockedByOtherErrorBuilder extends BaseErrorBuilder {
 
   private static final String UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG =
-      "Can not undo checkout on versionable entity %s with id %s since it is checked out by "
-          + "other user: %s.";
+      "Can not undo checkout on versionable entity %s with id %s since it is checked "
+          +  "out by other user: %s.";
 
   /**
    * Instantiates a new Undo checkout on entity locked by other error builder.
@@ -44,7 +41,8 @@
    */
   public UndoCheckoutOnEntityLockedByOtherErrorBuilder(String entityType, String entityId,
                                                        String lockingUser) {
-    getErrorCodeBuilder().withId(UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER);
+    getErrorCodeBuilder().withId(
+        VersioningErrorCodes.UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER);
     getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
     getErrorCodeBuilder().withMessage(String
         .format(UNDO_CHECKOUT_ON_ENTITY_LOCKED_BY_OTHER_USER_MSG, entityType, entityId,
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnUnlockedEntityErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnUnlockedEntityErrorBuilder.java
index 36ca5b5..d56473f 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnUnlockedEntityErrorBuilder.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/errors/UndoCheckoutOnUnlockedEntityErrorBuilder.java
@@ -20,13 +20,9 @@
 
 package org.openecomp.sdc.versioning.errors;
 
-import static org.openecomp.sdc.versioning.errors.VersioningErrorCodes
-    .UNDO_CHECKOUT_ON_UNLOCKED_ENTITY;
-
 import org.openecomp.sdc.common.errors.BaseErrorBuilder;
 import org.openecomp.sdc.common.errors.ErrorCategory;
 
-
 /**
  * The type Undo checkout on unlocked entity error builder.
  */
@@ -42,7 +38,7 @@
    * @param entityId   the entity id
    */
   public UndoCheckoutOnUnlockedEntityErrorBuilder(String entityType, String entityId) {
-    getErrorCodeBuilder().withId(UNDO_CHECKOUT_ON_UNLOCKED_ENTITY);
+    getErrorCodeBuilder().withId(VersioningErrorCodes.UNDO_CHECKOUT_ON_UNLOCKED_ENTITY);
     getErrorCodeBuilder().withCategory(ErrorCategory.APPLICATION);
     getErrorCodeBuilder()
         .withMessage(String.format(UNDO_CHECKOUT_ON_UNLOCKED_ENTITY_MSG, entityType, entityId));
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityAction.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityAction.java
index c741385..ef9fef2 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityAction.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityAction.java
@@ -22,5 +22,5 @@
 
 public enum VersionableEntityAction {
   Read,
-  Write
+  Write;
 }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java
index 161221a..8ec54c9 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityMetadata.java
@@ -25,25 +25,33 @@
 
 public class VersionableEntityMetadata {
 
+  private VersionableEntityStoreType storeType;
   private String name;
   private String identifierName;
   private String versionIdentifierName;
   private List<UniqueValueMetadata> uniqueValuesMetadata = new ArrayList<>();
 
-  /**
-   * Instantiates a new Versionable entity metadata.
-   *
-   * @param name                  the name
-   * @param identifierName        the identifier name
-   * @param versionIdentifierName the version identifier name
-   */
   public VersionableEntityMetadata(String name, String identifierName,
                                    String versionIdentifierName) {
+    this(VersionableEntityStoreType.Cassandra, name, identifierName, versionIdentifierName);
+  }
+
+  public VersionableEntityMetadata(VersionableEntityStoreType storeType, String name,
+                                   String identifierName, String versionIdentifierName) {
+    this.storeType = storeType;
     this.name = name;
     this.identifierName = identifierName;
     this.versionIdentifierName = versionIdentifierName;
   }
 
+  public VersionableEntityStoreType getStoreType() {
+    return storeType;
+  }
+
+  public void setStoreType(VersionableEntityStoreType storeType) {
+    this.storeType = storeType;
+  }
+
   public String getName() {
     return name;
   }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityStoreType.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityStoreType.java
new file mode 100644
index 0000000..72c5ecd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/types/VersionableEntityStoreType.java
@@ -0,0 +1,6 @@
+package org.openecomp.sdc.versioning.types;
+
+public enum VersionableEntityStoreType {
+  Cassandra,
+  Zusammen
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/resources/factoryConfiguration.json b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/resources/factoryConfiguration.json
index f36c2d5..e38ad1a 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/resources/factoryConfiguration.json
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/resources/factoryConfiguration.json
@@ -1,7 +1,6 @@
 {
   "org.openecomp.sdc.versioning.VersioningManagerFactory": "org.openecomp.sdc.versioning.impl.VersioningManagerFactoryImpl",
-  "org.openecomp.sdc.versioning.dao.VersionableEntityDaoFactory" : "org.openecomp.sdc.versioning.dao.impl.VersionableEntityDaoFactoryImpl",
+  "org.openecomp.sdc.versioning.dao.VersionableEntityDaoFactory": "org.openecomp.sdc.versioning.dao.impl.VersionableEntityDaoFactoryImpl",
   "org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory": "org.openecomp.sdc.versioning.dao.impl.VersionInfoDaoFactoryImpl",
   "org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory": "org.openecomp.sdc.versioning.dao.impl.VersionInfoDeletedDaoFactoryImpl"
-
 }
\ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml
index 89e53b2..fa693dc 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml
@@ -1,7 +1,12 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
+    <name>openecomp-sdc-versioning-core</name>
+    <artifactId>openecomp-sdc-versioning-core</artifactId>
+
+
     <parent>
         <groupId>org.openecomp.sdc</groupId>
         <artifactId>openecomp-sdc-lib</artifactId>
@@ -9,10 +14,6 @@
         <relativePath>../..</relativePath>
     </parent>
 
-    <name>openecomp-sdc-versioning-core</name>
-    <artifactId>openecomp-sdc-versioning-core</artifactId>
-
-
     <dependencies>
         <dependency>
             <groupId>org.openecomp.sdc</groupId>
@@ -20,23 +21,21 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <version>2.3.1</version>
-            <scope>test</scope>
+            <groupId>org.openecomp.core</groupId>
+            <artifactId>openecomp-zusammen-api</artifactId>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.yaml</groupId>
-            <artifactId>snakeyaml</artifactId>
-            <version>1.14</version>
-            <scope>test</scope>
+            <groupId>org.openecomp.core</groupId>
+            <artifactId>openecomp-zusammen-core</artifactId>
+            <version>${project.version}</version>
+            <scope>runtime</scope>
         </dependency>
-
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
             <scope>test</scope>
-            <version>1.10.19</version>
+            <version>${mockito.all.version}</version>
         </dependency>
         <dependency>
             <groupId>org.testng</groupId>
@@ -54,8 +53,13 @@
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
-            <version>RELEASE</version>
+            <version>4.11</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdc</groupId>
+            <artifactId>openecomp-sdc-logging-core</artifactId>
+            <version>${project.version}</version>
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml.versionsBackup b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml.versionsBackup
new file mode 100644
index 0000000..ce41a59
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/pom.xml.versionsBackup
@@ -0,0 +1,54 @@
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <name>openecomp-sdc-versioning-core</name>
+    <artifactId>openecomp-sdc-versioning-core</artifactId>
+
+
+    <parent>
+        <groupId>org.openecomp.sdc</groupId>
+        <artifactId>openecomp-sdc-lib</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    <dependencies>
+        <dependency>
+            <groupId>org.openecomp.sdc</groupId>
+            <artifactId>openecomp-sdc-versioning-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <scope>test</scope>
+            <version>1.10.19</version>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <scope>test</scope>
+            <version>6.8.5</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>snakeyaml</artifactId>
+                    <groupId>org.yaml</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+            <version>4.11</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdc</groupId>
+            <artifactId>openecomp-sdc-logging-core</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java
index a50a8b7..b364da0 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java
@@ -36,7 +36,8 @@
 import java.util.Collection;
 
 public class VersionHistoryCassandraDaoImpl extends CassandraBaseDao<VersionHistoryEntity>
-    implements VersionHistoryDao {
+    implements
+    VersionHistoryDao {
 
   private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
   private static Mapper<VersionHistoryEntity> mapper =
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java
index a45c211..7bc73ce 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java
@@ -40,8 +40,6 @@
       noSqlDb.getMappingManager().mapper(VersionInfoEntity.class);
   private static VersionInfoAccessor accessor =
       noSqlDb.getMappingManager().createAccessor(VersionInfoAccessor.class);
-  //private static UDTMapper<VersionableEntityId> versionedEntityIdMapper = noSqlDb
-  //.getMappingManager().udtMapper(VersionableEntityId.class);
 
   @Override
   protected Mapper<VersionInfoEntity> getMapper() {
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java
index 82e4edc..af6b202 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java
@@ -20,6 +20,7 @@
 
 package org.openecomp.sdc.versioning.dao.impl;
 
+
 import com.datastax.driver.mapping.Mapper;
 import com.datastax.driver.mapping.Result;
 import com.datastax.driver.mapping.annotations.Accessor;
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java
index f02ea89..5673da7 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java
@@ -24,6 +24,8 @@
 import com.datastax.driver.core.ResultSet;
 import com.datastax.driver.core.Row;
 import com.datastax.driver.mapping.UDTMapper;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
 import org.openecomp.core.nosqldb.api.NoSqlDb;
 import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
 import org.openecomp.core.util.UniqueValueUtil;
@@ -33,8 +35,6 @@
 import org.openecomp.sdc.versioning.types.UniqueValueMetadata;
 import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
 
-import org.slf4j.LoggerFactory;
-
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -45,8 +45,8 @@
 class VersionableEntityDaoCassandraImpl implements VersionableEntityDao {
 
   private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static org.slf4j.Logger Logger =
-      LoggerFactory.getLogger(VersionableEntityDaoCassandraImpl.class);
+  private static Logger Logger =
+      (Logger) LoggerFactory.getLogger(VersionableEntityDaoCassandraImpl.class);
   private static UDTMapper<Version> versionMapper =
       noSqlDb.getMappingManager().udtMapper(Version.class);
 
@@ -96,6 +96,22 @@
     }
   }
 
+  @Override
+  public void deleteVersion(VersionableEntityMetadata metadata, String entityId,
+                            Version versionToDelete, Version backToVersion) {
+    deleteRowsUniqueValues(metadata, entityId, versionToDelete);
+
+    String deleteCql = String.format("delete from %s where %s=? and %s=?", metadata.getName(),
+        metadata.getIdentifierName(), metadata.getVersionIdentifierName());
+    noSqlDb.execute(deleteCql, entityId, versionMapper.toUDT(versionToDelete));
+  }
+
+  @Override
+  public void closeVersion(VersionableEntityMetadata versionableTableMetadata, String entityId,
+                           Version versionToClose) {
+    // redundant in cassandra impl.
+  }
+
   private ResultSet loadVersionRows(VersionableEntityMetadata metadata, String entityId,
                                     Version version) {
     String selectCql = String.format("select * from %s where %s=? and %s=?", metadata.getName(),
@@ -107,16 +123,6 @@
     return noSqlDb.execute(selectCql, entityId, versionMapper.toUDT(version));
   }
 
-  @Override
-  public void deleteVersion(VersionableEntityMetadata metadata, String entityId,
-                            Version versionToDelete) {
-    deleteRowsUniqueValues(metadata, entityId, versionToDelete);
-
-    String deleteCql = String.format("delete from %s where %s=? and %s=?", metadata.getName(),
-        metadata.getIdentifierName(), metadata.getVersionIdentifierName());
-    noSqlDb.execute(deleteCql, entityId, versionMapper.toUDT(versionToDelete));
-  }
-
   private void initRowUniqueValues(List<UniqueValueMetadata> metadata,
                                    Map<String, Object> columnNameToValue) {
     for (UniqueValueMetadata uniqueMetadata : metadata) {
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java
index 8ec0814..3ab6560 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java
@@ -20,14 +20,31 @@
 
 package org.openecomp.sdc.versioning.dao.impl;
 
+import org.openecomp.core.zusammen.api.ZusammenAdaptorFactory;
 import org.openecomp.sdc.versioning.dao.VersionableEntityDao;
 import org.openecomp.sdc.versioning.dao.VersionableEntityDaoFactory;
+import org.openecomp.sdc.versioning.types.VersionableEntityStoreType;
 
 public class VersionableEntityDaoFactoryImpl extends VersionableEntityDaoFactory {
-  private static VersionableEntityDao INSTANCE = new VersionableEntityDaoCassandraImpl();
+  private static VersionableEntityDao CASSANDRA_INSTANCE = new VersionableEntityDaoCassandraImpl();
+  private static VersionableEntityDao ZUSAMMEN_INSTANCE =
+      new VersionableEntityDaoZusammenImpl(ZusammenAdaptorFactory.getInstance().createInterface());
 
   @Override
   public VersionableEntityDao createInterface() {
-    return INSTANCE;
+    throw new UnsupportedOperationException
+        ("Please use createInterface api with VersionableEntityStoreType argument.");
+  }
+
+  @Override
+  public VersionableEntityDao createInterface(VersionableEntityStoreType storeType) {
+    switch (storeType) {
+      case Cassandra:
+        return CASSANDRA_INSTANCE;
+      case Zusammen:
+        return ZUSAMMEN_INSTANCE;
+      default:
+        throw new IllegalArgumentException("Unssported state store");
+    }
   }
 }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoZusammenImpl.java
new file mode 100644
index 0000000..9e12d0d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoZusammenImpl.java
@@ -0,0 +1,55 @@
+package org.openecomp.sdc.versioning.dao.impl;
+
+import com.amdocs.zusammen.datatypes.Id;
+import com.amdocs.zusammen.datatypes.SessionContext;
+import com.amdocs.zusammen.datatypes.item.ItemVersion;
+import com.amdocs.zusammen.datatypes.itemversion.Tag;
+import org.openecomp.core.zusammen.api.ZusammenAdaptor;
+import org.openecomp.core.zusammen.api.ZusammenUtil;
+import org.openecomp.sdc.versioning.dao.VersionableEntityDao;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+
+import java.util.Optional;
+
+public class VersionableEntityDaoZusammenImpl implements VersionableEntityDao {
+
+  private ZusammenAdaptor zusammenAdaptor;
+
+  public VersionableEntityDaoZusammenImpl(ZusammenAdaptor zusammenAdaptor) {
+    this.zusammenAdaptor = zusammenAdaptor;
+  }
+
+  @Override
+  public void initVersion(VersionableEntityMetadata versionableTableMetadata, String entityId,
+                          Version baseVersion, Version newVersion) {
+    // redundant in zusammen impl.
+  }
+
+  @Override
+  public void deleteVersion(VersionableEntityMetadata versionableTableMetadata, String entityId,
+                            Version versionToDelete, Version backToVersion) {
+    SessionContext context = ZusammenUtil.createSessionContext();
+    Id itemId = new Id(entityId);
+    Id versionId = getItemVersionId(itemId, context);
+    zusammenAdaptor.resetVersionHistory(context, itemId, versionId, backToVersion.toString());
+  }
+
+  @Override
+  public void closeVersion(VersionableEntityMetadata versionableTableMetadata, String entityId,
+                           Version versionToClose) {
+    SessionContext context = ZusammenUtil.createSessionContext();
+    Id itemId = new Id(entityId);
+    Id versionId = getItemVersionId(itemId, context);
+    zusammenAdaptor
+        .tagVersion(context, itemId, versionId, new Tag(versionToClose.toString(), null));
+  }
+
+  // TODO: 3/19/2017 move to a common util
+  private Id getItemVersionId(Id itemId, SessionContext context) {
+    Optional<ItemVersion> itemVersionOptional = zusammenAdaptor.getFirstVersion(context, itemId);
+    ItemVersion itemVersion = itemVersionOptional.orElseThrow(() ->
+        new RuntimeException(String.format("No version was found for item %s.", itemId)));
+    return itemVersion.getId();
+  }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerFactoryImpl.java
index f7065cf..8ab5c60 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerFactoryImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerFactoryImpl.java
@@ -22,9 +22,14 @@
 
 import org.openecomp.sdc.versioning.VersioningManager;
 import org.openecomp.sdc.versioning.VersioningManagerFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory;
 
 public class VersioningManagerFactoryImpl extends VersioningManagerFactory {
-  private static final VersioningManager INSTANCE = new VersioningManagerImpl();
+  private static final VersioningManager INSTANCE = new VersioningManagerImpl(
+      VersionInfoDaoFactory.getInstance().createInterface(),
+      VersionInfoDeletedDaoFactory.getInstance().createInterface()
+  );
 
   @Override
   public VersioningManager createInterface() {
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java
index 6aa2a9f..0bbe3f8 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersioningManagerImpl.java
@@ -21,12 +21,16 @@
 package org.openecomp.sdc.versioning.impl;
 
 import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.datatypes.error.ErrorLevel;
+import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
+import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage;
+import org.openecomp.sdc.logging.types.LoggerConstants;
+import org.openecomp.sdc.logging.types.LoggerErrorCode;
+import org.openecomp.sdc.logging.types.LoggerErrorDescription;
+import org.openecomp.sdc.logging.types.LoggerTragetServiceName;
 import org.openecomp.sdc.versioning.VersioningManager;
 import org.openecomp.sdc.versioning.dao.VersionInfoDao;
-import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
 import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
-import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory;
-import org.openecomp.sdc.versioning.dao.VersionableEntityDao;
 import org.openecomp.sdc.versioning.dao.VersionableEntityDaoFactory;
 import org.openecomp.sdc.versioning.dao.types.UserCandidateVersion;
 import org.openecomp.sdc.versioning.dao.types.Version;
@@ -51,6 +55,7 @@
 import org.openecomp.sdc.versioning.types.VersionInfo;
 import org.openecomp.sdc.versioning.types.VersionableEntityAction;
 import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
+import org.slf4j.MDC;
 
 import java.util.Collection;
 import java.util.HashMap;
@@ -63,15 +68,18 @@
 public class VersioningManagerImpl implements VersioningManager {
 
   private static final Version INITIAL_ACTIVE_VERSION = new Version(0, 0);
-  private static VersionInfoDao versionInfoDao =
-      VersionInfoDaoFactory.getInstance().createInterface();
-  private static VersionInfoDeletedDao versionInfoDeletedDao =
-      VersionInfoDeletedDaoFactory.getInstance().createInterface();
-  private static VersionableEntityDao versionableEntityDao =
-      VersionableEntityDaoFactory.getInstance().createInterface();
-
+  private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
   private static Map<String, Set<VersionableEntityMetadata>> versionableEntities = new HashMap<>();
 
+  private VersionInfoDao versionInfoDao;
+  private VersionInfoDeletedDao versionInfoDeletedDao;
+
+  public VersioningManagerImpl(VersionInfoDao versionInfoDao,
+                               VersionInfoDeletedDao versionInfoDeletedDao) {
+    this.versionInfoDao = versionInfoDao;
+    this.versionInfoDeletedDao = versionInfoDeletedDao;
+  }
+
   private static VersionInfo getVersionInfo(VersionInfoEntity versionInfoEntity, String user,
                                             VersionableEntityAction action) {
     return getVersionInfo(versionInfoEntity.getEntityId(),
@@ -103,6 +111,10 @@
                                             Version latestFinalVersion,
                                             Set<Version> viewableVersions,
                                             VersionableEntityAction action, String user) {
+
+
+    mdcDataDebugMessage.debugEntryMessage("entity Id", entityId);
+
     Version activeVersion;
 
     if (action == VersionableEntityAction.Write) {
@@ -110,11 +122,17 @@
         if (user.equals(candidate.getUser())) {
           activeVersion = candidate.getVersion();
         } else {
+          MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+              LoggerTragetServiceName.GET_VERSION_INFO, ErrorLevel.ERROR.name(),
+              LoggerErrorCode.PERMISSION_ERROR.getErrorCode(), "Can't get entity version info");
           throw new CoreException(
               new EditOnEntityLockedByOtherErrorBuilder(entityType, entityId, candidate.getUser())
                   .build());
         }
       } else {
+        MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+            LoggerTragetServiceName.GET_VERSION_INFO, ErrorLevel.ERROR.name(),
+            LoggerErrorCode.PERMISSION_ERROR.getErrorCode(), "Can't get entity version info");
         throw new CoreException(new EditOnUnlockedEntityErrorBuilder(entityType, entityId).build());
       }
     } else {
@@ -126,17 +144,23 @@
     }
 
     VersionInfo versionInfo = new VersionInfo();
+    versionInfo.setStatus(status);
+    activeVersion.setStatus(status);
+    if(latestFinalVersion!= null) latestFinalVersion.setStatus(status);
+    if(viewableVersions != null) viewableVersions.forEach(version->version.setStatus(status));
     versionInfo.setActiveVersion(activeVersion);
     versionInfo.setLatestFinalVersion(latestFinalVersion);
     versionInfo.setViewableVersions(toSortedList(viewableVersions));
     versionInfo.setFinalVersions(getFinalVersions(viewableVersions));
-    versionInfo.setStatus(status);
     if (candidate != null) {
+      candidate.getVersion().setStatus(status);
       versionInfo.setLockingUser(candidate.getUser());
       if (user.equals(candidate.getUser())) {
         versionInfo.getViewableVersions().add(candidate.getVersion());
       }
     }
+
+    mdcDataDebugMessage.debugExitMessage("entity Id", entityId);
     return versionInfo;
   }
 
@@ -150,24 +174,24 @@
   }
 
   private static List<Version> getFinalVersions(Set<Version> versions) {
-    return versions.stream().filter(version -> version.isFinal()).collect(Collectors.toList());
+    return versions.stream().filter(Version::isFinal).collect(Collectors.toList());
   }
 
   @Override
   public void register(String entityType, VersionableEntityMetadata entityMetadata) {
-    Set<VersionableEntityMetadata> entitiesMetadata = versionableEntities.get(entityType);
-    if (entitiesMetadata == null) {
-      entitiesMetadata = new HashSet<>();
-      versionableEntities.put(entityType, entitiesMetadata);
-    }
+    Set<VersionableEntityMetadata> entitiesMetadata =
+        versionableEntities.computeIfAbsent(entityType, k -> new HashSet<>());
     entitiesMetadata.add(entityMetadata);
   }
 
   @Override
   public Version create(String entityType, String entityId, String user) {
-    VersionInfoEntity versionInfoEntity =
-        versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+    VersionInfoEntity
+        versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
     if (versionInfoEntity != null) {
+      MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+          LoggerTragetServiceName.CREATE_ENTITY, ErrorLevel.ERROR.name(),
+          LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't create versionable entity");
       throw new CoreException(new EntityAlreadyExistErrorBuilder(entityType, entityId).build());
     }
 
@@ -180,16 +204,63 @@
   }
 
   @Override
-  public Version checkout(String entityType, String entityId, String user) {
+  public void delete(String entityType, String entityId, String user) {
     VersionInfoEntity versionInfoEntity =
         versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
     if (versionInfoEntity == null) {
+      MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+          LoggerTragetServiceName.DELETE_ENTITY, ErrorLevel.ERROR.name(),
+          LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't delete versionable entity");
+      throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+    }
+
+    switch (versionInfoEntity.getStatus()) {
+      case Locked:
+        MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+            LoggerTragetServiceName.DELETE_ENTITY, ErrorLevel.ERROR.name(),
+            LoggerErrorCode.PERMISSION_ERROR.getErrorCode(), "Can't delete versionable entity");
+        throw new CoreException(new DeleteOnLockedEntityErrorBuilder(entityType, entityId,
+            versionInfoEntity.getCandidate().getUser()).build());
+      default:
+        //do nothing
+        break;
+    }
+
+    doDelete(versionInfoEntity);
+  }
+
+  @Override
+  public void undoDelete(String entityType, String entityId, String user) {
+    VersionInfoDeletedEntity versionInfoDeletedEntity =
+        versionInfoDeletedDao.get(new VersionInfoDeletedEntity(entityType, entityId));
+    if (versionInfoDeletedEntity == null) {
+      MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+          LoggerTragetServiceName.UNDO_DELETE_ENTITY, ErrorLevel.ERROR.name(),
+          LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't undo delete for versionable entity");
+      throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
+    }
+
+    doUndoDelete(versionInfoDeletedEntity);
+  }
+
+  @Override
+  public Version checkout(String entityType, String entityId, String user) {
+    VersionInfoEntity versionInfoEntity =
+        versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
+    MDC.put(LoggerConstants.TARGET_SERVICE_NAME, LoggerTragetServiceName.CHECKOUT_ENTITY);
+    if (versionInfoEntity == null) {
+      MDC.put(LoggerConstants.ERROR_CATEGORY, ErrorLevel.ERROR.name());
+      MDC.put(LoggerConstants.TARGET_ENTITY, LoggerConstants.TARGET_ENTITY_DB);
+      MDC.put(LoggerConstants.ERROR_DESCRIPTION, LoggerErrorDescription.CHECKOUT_ENTITY);
       throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
     }
 
     Version checkoutVersion = null;
     switch (versionInfoEntity.getStatus()) {
       case Locked:
+        MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+            LoggerTragetServiceName.CHECKOUT_ENTITY, ErrorLevel.ERROR.name(),
+            LoggerErrorCode.PERMISSION_ERROR.getErrorCode(), "Can't checkout versionable entity");
         throw new CoreException(new CheckoutOnLockedEntityErrorBuilder(entityType, entityId,
             versionInfoEntity.getCandidate().getUser()).build());
       case Final:
@@ -197,7 +268,10 @@
         checkoutVersion = doCheckout(versionInfoEntity, user);
         break;
       default:
+        //do nothing
+        break;
     }
+
     return checkoutVersion;
   }
 
@@ -206,6 +280,9 @@
     VersionInfoEntity versionInfoEntity =
         versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
     if (versionInfoEntity == null) {
+      MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+          LoggerTragetServiceName.UNDO_CHECKOUT_ENTITY, ErrorLevel.ERROR.name(),
+          LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't undo checkout for versionable entity");
       throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
     }
 
@@ -213,6 +290,10 @@
     switch (versionInfoEntity.getStatus()) {
       case Locked:
         if (!user.equals(versionInfoEntity.getCandidate().getUser())) {
+          MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+              LoggerTragetServiceName.UNDO_CHECKOUT_ENTITY, ErrorLevel.ERROR.name(),
+              LoggerErrorCode.PERMISSION_ERROR.getErrorCode(),
+              "Can't undo checkout for versionable entity");
           throw new CoreException(
               new UndoCheckoutOnEntityLockedByOtherErrorBuilder(entityType, entityId,
                   versionInfoEntity.getCandidate().getUser()).build());
@@ -221,16 +302,23 @@
         break;
       case Final:
       case Available:
+        MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+            LoggerTragetServiceName.UNDO_CHECKOUT_ENTITY, ErrorLevel.ERROR.name(),
+            LoggerErrorCode.PERMISSION_ERROR.getErrorCode(),
+            "Can't undo checkout for versionable entity");
         throw new CoreException(
             new UndoCheckoutOnUnlockedEntityErrorBuilder(entityType, entityId).build());
       default:
+        //do nothing
+        break;
     }
+
     return activeVersion;
   }
 
   private Version undoCheckout(VersionInfoEntity versionInfoEntity) {
     deleteVersionFromEntity(versionInfoEntity.getEntityType(), versionInfoEntity.getEntityId(),
-        versionInfoEntity.getCandidate().getVersion());
+        versionInfoEntity.getCandidate().getVersion(), versionInfoEntity.getActiveVersion());
 
     versionInfoEntity.setStatus(versionInfoEntity.getActiveVersion().isFinal() ? VersionStatus.Final
         : VersionStatus.Available);
@@ -245,6 +333,9 @@
     VersionInfoEntity versionInfoEntity =
         versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
     if (versionInfoEntity == null) {
+      MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+          LoggerTragetServiceName.CHECKIN_ENTITY, ErrorLevel.ERROR.name(),
+          LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't checkin versionable entity");
       throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
     }
 
@@ -252,17 +343,26 @@
     switch (versionInfoEntity.getStatus()) {
       case Available:
       case Final:
+        MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+            LoggerTragetServiceName.CHECKIN_ENTITY, ErrorLevel.ERROR.name(),
+            LoggerErrorCode.PERMISSION_ERROR.getErrorCode(), "Can't checkin versionable entity");
         throw new CoreException(
             new CheckinOnUnlockedEntityErrorBuilder(entityType, entityId).build());
       case Locked:
         if (!user.equals(versionInfoEntity.getCandidate().getUser())) {
+          MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+              LoggerTragetServiceName.CHECKIN_ENTITY, ErrorLevel.ERROR.name(),
+              LoggerErrorCode.PERMISSION_ERROR.getErrorCode(), "Can't checkin versionable entity");
           throw new CoreException(new CheckinOnEntityLockedByOtherErrorBuilder(entityType, entityId,
               versionInfoEntity.getCandidate().getUser()).build());
         }
         checkedInVersion = doCheckin(versionInfoEntity, checkinDescription);
         break;
       default:
+        //do nothing
+        break;
     }
+
     return checkedInVersion;
   }
 
@@ -271,22 +371,34 @@
     VersionInfoEntity versionInfoEntity =
         versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
     if (versionInfoEntity == null) {
+      MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+          LoggerTragetServiceName.SUBMIT_ENTITY, ErrorLevel.ERROR.name(),
+          LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't submit versionable entity");
       throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
     }
 
     Version submitVersion = null;
     switch (versionInfoEntity.getStatus()) {
       case Final:
+        MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+            LoggerTragetServiceName.SUBMIT_ENTITY, ErrorLevel.ERROR.name(),
+            LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't submit versionable entity");
         throw new CoreException(
             new EntityAlreadyFinalizedErrorBuilder(entityType, entityId).build());
       case Locked:
+        MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+            LoggerTragetServiceName.SUBMIT_ENTITY, ErrorLevel.ERROR.name(),
+            LoggerErrorCode.PERMISSION_ERROR.getErrorCode(), "Can't submit versionable entity");
         throw new CoreException(new SubmitLockedEntityNotAllowedErrorBuilder(entityType, entityId,
             versionInfoEntity.getCandidate().getUser()).build());
       case Available:
         submitVersion = doSubmit(versionInfoEntity, user, submitDescription);
         break;
       default:
+        //do nothing
+        break;
     }
+
     return submitVersion;
   }
 
@@ -296,6 +408,9 @@
     VersionInfoEntity versionInfoEntity =
         versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
     if (versionInfoEntity == null) {
+      MdcDataErrorMessage.createErrorMessageAndUpdateMdc(LoggerConstants.TARGET_ENTITY_DB,
+          LoggerTragetServiceName.GET_VERSION_INFO, ErrorLevel.ERROR.name(),
+          LoggerErrorCode.DATA_ERROR.getErrorCode(), "Can't get entity version info");
       throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
     }
     return getVersionInfo(versionInfoEntity, user, action);
@@ -329,35 +444,6 @@
     return activeVersions;
   }
 
-  @Override
-  public void delete(String entityType, String entityId, String user) {
-    VersionInfoEntity versionInfoEntity =
-        versionInfoDao.get(new VersionInfoEntity(entityType, entityId));
-    if (versionInfoEntity == null) {
-      throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
-    }
-
-    switch (versionInfoEntity.getStatus()) {
-      case Locked:
-        throw new CoreException(new DeleteOnLockedEntityErrorBuilder(entityType, entityId,
-            versionInfoEntity.getCandidate().getUser()).build());
-      default:
-    }
-
-    doDelete(versionInfoEntity, user);
-  }
-
-  @Override
-  public void undoDelete(String entityType, String entityId, String user) {
-    VersionInfoDeletedEntity versionInfoDeletedEntity =
-        versionInfoDeletedDao.get(new VersionInfoDeletedEntity(entityType, entityId));
-    if (versionInfoDeletedEntity == null) {
-      throw new CoreException(new EntityNotExistErrorBuilder(entityType, entityId).build());
-    }
-
-    doUndoDelete(versionInfoDeletedEntity, user);
-  }
-
   private void markAsCheckedOut(VersionInfoEntity versionInfoEntity, String checkingOutUser) {
     versionInfoEntity.setStatus(VersionStatus.Locked);
     versionInfoEntity.setCandidate(new UserCandidateVersion(checkingOutUser,
@@ -374,8 +460,7 @@
     return versionInfoEntity.getCandidate().getVersion();
   }
 
-  private void doDelete(VersionInfoEntity versionInfoEntity, String user) {
-
+  private void doDelete(VersionInfoEntity versionInfoEntity) {
     VersionInfoDeletedEntity versionInfoDeletedEntity = new VersionInfoDeletedEntity();
     versionInfoDeletedEntity.setStatus(versionInfoEntity.getStatus());
     versionInfoDeletedEntity.setViewableVersions(versionInfoEntity.getViewableVersions());
@@ -386,11 +471,9 @@
     versionInfoDeletedEntity.setLatestFinalVersion(versionInfoEntity.getLatestFinalVersion());
     versionInfoDeletedDao.create(versionInfoDeletedEntity);
     versionInfoDao.delete(versionInfoEntity);
-
   }
 
-  private void doUndoDelete(VersionInfoDeletedEntity versionInfoDeletedEntity, String user) {
-
+  private void doUndoDelete(VersionInfoDeletedEntity versionInfoDeletedEntity) {
     VersionInfoEntity versionInfoEntity = new VersionInfoEntity();
     versionInfoEntity.setStatus(versionInfoDeletedEntity.getStatus());
     versionInfoEntity.setViewableVersions(versionInfoDeletedEntity.getViewableVersions());
@@ -401,7 +484,6 @@
     versionInfoEntity.setLatestFinalVersion(versionInfoDeletedEntity.getLatestFinalVersion());
     versionInfoDao.create(versionInfoEntity);
     versionInfoDeletedDao.delete(versionInfoDeletedEntity);
-
   }
 
   private Version doCheckin(VersionInfoEntity versionInfoEntity, String checkinDescription) {
@@ -412,6 +494,9 @@
     versionInfoEntity.setStatus(VersionStatus.Available);
     versionInfoDao.update(versionInfoEntity);
 
+    closeVersionOnEntity(versionInfoEntity.getEntityType(), versionInfoEntity.getEntityId(),
+        versionInfoEntity.getActiveVersion());
+
     return versionInfoEntity.getActiveVersion();
   }
 
@@ -420,6 +505,8 @@
     Version finalVersion = versionInfoEntity.getActiveVersion().calculateNextFinal();
     initVersionOnEntity(versionInfoEntity.getEntityType(), versionInfoEntity.getEntityId(),
         versionInfoEntity.getActiveVersion(), finalVersion);
+    closeVersionOnEntity(versionInfoEntity.getEntityType(), versionInfoEntity.getEntityId(),
+        finalVersion);
 
     Set<Version> viewableVersions = new HashSet<>();
     for (Version version : versionInfoEntity.getViewableVersions()) {
@@ -444,6 +531,7 @@
     versionHistory.setUser(user);
     versionHistory.setDescription(description);
     versionHistory.setType(type);
+    //versionHistoryDao.create(versionHistory);
   }
 
   private void initVersionOnEntity(String entityType, String entityId, Version baseVersion,
@@ -451,17 +539,29 @@
     Set<VersionableEntityMetadata> entityMetadatas = versionableEntities.get(entityType);
     if (entityMetadatas != null) {
       for (VersionableEntityMetadata entityMetadata : entityMetadatas) {
-        versionableEntityDao.initVersion(entityMetadata, entityId, baseVersion, newVersion);
+        VersionableEntityDaoFactory.getInstance().createInterface(entityMetadata.getStoreType())
+            .initVersion(entityMetadata, entityId, baseVersion, newVersion);
       }
     }
   }
 
   private void deleteVersionFromEntity(String entityType, String entityId,
-                                       Version versionToDelete) {
+                                       Version versionToDelete, Version backToVersion) {
     Set<VersionableEntityMetadata> entityMetadatas = versionableEntities.get(entityType);
     if (entityMetadatas != null) {
       for (VersionableEntityMetadata entityMetadata : entityMetadatas) {
-        versionableEntityDao.deleteVersion(entityMetadata, entityId, versionToDelete);
+        VersionableEntityDaoFactory.getInstance().createInterface(entityMetadata.getStoreType())
+            .deleteVersion(entityMetadata, entityId, versionToDelete, backToVersion);
+      }
+    }
+  }
+
+  private void closeVersionOnEntity(String entityType, String entityId, Version versionToClose) {
+    Set<VersionableEntityMetadata> entityMetadatas = versionableEntities.get(entityType);
+    if (entityMetadatas != null) {
+      for (VersionableEntityMetadata entityMetadata : entityMetadatas) {
+        VersionableEntityDaoFactory.getInstance().createInterface(entityMetadata.getStoreType())
+            .closeVersion(entityMetadata, entityId, versionToClose);
       }
     }
   }
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/VersioningManagerTest.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/VersioningManagerTest.java
deleted file mode 100644
index 3695f9e..0000000
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/VersioningManagerTest.java
+++ /dev/null
@@ -1,364 +0,0 @@
-package org.openecomp.sdc.versioning;
-
-
-import org.openecomp.sdc.common.errors.CoreException;
-import org.openecomp.sdc.versioning.dao.VersionInfoDao;
-import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory;
-import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
-import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory;
-import org.openecomp.sdc.versioning.dao.types.Version;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-import org.openecomp.sdc.versioning.dao.types.VersionStatus;
-import org.openecomp.sdc.versioning.types.VersionInfo;
-import org.openecomp.sdc.versioning.types.VersionableEntityAction;
-import org.openecomp.sdc.versioning.types.VersionableEntityMetadata;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import com.datastax.driver.core.ResultSet;
-import com.datastax.driver.mapping.UDTMapper;
-
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-public class VersioningManagerTest {
-  private static final VersioningManager versioningManager =
-      VersioningManagerFactory.getInstance().createInterface();
-  private static final VersionInfoDao versionInfoDao =
-      VersionInfoDaoFactory.getInstance().createInterface();
-  private static final VersionInfoDeletedDao versionInfoDeletedDao =
-      VersionInfoDeletedDaoFactory.getInstance().createInterface();
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final String USR1 = "usr1";
-  private static final String USR2 = "usr2";
-  private static final String USR3 = "usr3";
-  private static final String TYPE1 = "Type1";
-  private static final String TYPE2 = "Type2";
-  private static final String ID1 = "Id1";
-  private static final String ID2 = "Id2";
-  private static final String ID3 = "Id3";
-  private static final String TYPE1_TABLE_NAME = "vendor_license_model";
-  private static final String TYPE1_ID_NAME = "vlm_id";
-  private static final String TYPE1_VERSION_NAME = "version";
-  private static final String TYPE2_TABLE_NAME = "feature_group";
-  private static final String TYPE2_ID_NAME = "vlm_id";
-  private static final String TYPE2_VERSION_NAME = "version";
-  private static final Version VERSION01 = new Version(0, 1);
-  private static final Version VERSION02 = new Version(0, 2);
-  private static final Version VERSION10 = new Version(1, 0);
-  private static final Version VERSION11 = new Version(1, 1);
-  private static UDTMapper<Version> versionMapper =
-      noSqlDb.getMappingManager().udtMapper(Version.class);
-  private static Set<Version> expectedViewableVersionsType1Id1 = new HashSet<>();
-
-  private static void assretVersionInfoEntity(VersionInfoEntity actual, String entityType,
-                                              String entityId, Version activeVersion,
-                                              Version candidateVersion, String candidateUser,
-                                              VersionStatus status, Set<Version> viewbleVersions,
-                                              Version latestFinalVersion) {
-    Assert.assertNotNull(actual);
-    Assert.assertEquals(actual.getEntityType(), entityType);
-    Assert.assertEquals(actual.getEntityId(), entityId);
-    Assert.assertEquals(actual.getActiveVersion(), activeVersion);
-    if (candidateVersion != null && candidateUser != null) {
-      Assert.assertEquals(actual.getCandidate().getVersion(), candidateVersion);
-      Assert.assertEquals(actual.getCandidate().getUser(), candidateUser);
-    } else {
-      Assert.assertNull(actual.getCandidate());
-    }
-    Assert.assertEquals(actual.getStatus(), status);
-    Assert.assertEquals(actual.getViewableVersions().size(), viewbleVersions.size());
-    Assert.assertEquals(actual.getViewableVersions(), viewbleVersions);
-    Assert.assertEquals(actual.getLatestFinalVersion(), latestFinalVersion);
-  }
-
-  private static void assretVersionInfo(VersionInfo actual, Version activeVersion,
-                                        VersionStatus status, String lockingUser,
-                                        Set<Version> viewableVersions, Version latestFinalVersion) {
-    Assert.assertNotNull(actual);
-    Assert.assertEquals(actual.getActiveVersion(), activeVersion);
-    Assert.assertEquals(actual.getStatus(), status);
-    Assert.assertEquals(actual.getLockingUser(), lockingUser);
-    Assert.assertEquals(actual.getViewableVersions().size(), viewableVersions.size());
-    Assert.assertEquals(actual.getViewableVersions(), viewableVersions);
-    Assert.assertEquals(actual.getLatestFinalVersion(), latestFinalVersion);
-  }
-
-//  @BeforeClass
-  private void init() {
-    versionInfoDao.delete(new VersionInfoEntity(TYPE1, ID1));
-    versionInfoDao.delete(new VersionInfoEntity(TYPE1, ID2));
-    versionInfoDao.delete(new VersionInfoEntity(TYPE2, ID3));
-    String deleteFromType1 = String
-        .format("delete from %s where %s=? and %s=?", TYPE1_TABLE_NAME, TYPE1_ID_NAME,
-            TYPE1_VERSION_NAME);
-    noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION01));
-    noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION02));
-    noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION11));
-
-    versioningManager.register(TYPE1,
-        new VersionableEntityMetadata(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME));
-    versioningManager.register(TYPE2,
-        new VersionableEntityMetadata(TYPE2_TABLE_NAME, TYPE2_ID_NAME, TYPE2_VERSION_NAME));
-  }
-
-//  @Test
-  public void createTest() {
-    Version version = versioningManager.create(TYPE1, ID1, USR1);
-    createVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
-        version);
-
-    VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, new Version(0, 0), VERSION01, USR1,
-        VersionStatus.Locked, expectedViewableVersionsType1Id1, null);
-  }
-
-//  @Test(dependsOnMethods = "createTest")
-  public void checkinTest() {
-    Version version = versioningManager.checkin(TYPE1, ID1, USR1, "checkin 0.1");
-    Assert.assertEquals(version, VERSION01);
-
-    VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    expectedViewableVersionsType1Id1.add(VERSION01);
-    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, null, null,
-        VersionStatus.Available, expectedViewableVersionsType1Id1, null);
-  }
-
-//  @Test(dependsOnMethods = "checkinTest")
-  public void getVersionInfoForReadOnAvailableTest() {
-    VersionInfo versionInfo =
-        versioningManager.getEntityVersionInfo(TYPE1, ID1, USR2, VersionableEntityAction.Read);
-    assretVersionInfo(versionInfo, VERSION01, VersionStatus.Available, null,
-        expectedViewableVersionsType1Id1, null);
-  }
-
-//  @Test(dependsOnMethods = "getVersionInfoForReadOnAvailableTest",
-//      expectedExceptions = CoreException.class)
-  public void getVersionInfoForWriteOnAvailableTest() {
-    versioningManager.getEntityVersionInfo(TYPE1, ID1, USR2, VersionableEntityAction.Write);
-  }
-
-//  @Test(dependsOnMethods = "getVersionInfoForWriteOnAvailableTest",
-//      expectedExceptions = CoreException.class)
-  public void checkinOnAvailableTest() {
-    versioningManager.checkin(TYPE1, ID1, USR1, "fail checkin");
-  }
-
-//  @Test(dependsOnMethods = "checkinOnAvailableTest", expectedExceptions = CoreException.class)
-  public void undoCheckoutOnAvailableTest() {
-    versioningManager.undoCheckout(TYPE1, ID1, USR1);
-  }
-
-//  @Test(dependsOnMethods = "undoCheckoutOnAvailableTest")
-  public void checkoutTest() {
-    Version version = versioningManager.checkout(TYPE1, ID1, USR2);
-    Assert.assertEquals(version, VERSION02);
-
-    VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, VERSION02, USR2,
-        VersionStatus.Locked, expectedViewableVersionsType1Id1, null);
-
-    ResultSet results =
-        loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
-            VERSION02);
-    Assert.assertTrue(results.iterator().hasNext());
-  }
-
-//  @Test(dependsOnMethods = "checkoutTest")
-  public void getVersionInfoForReadOnLockedSameUserTest() {
-    VersionInfo versionInfo =
-        versioningManager.getEntityVersionInfo(TYPE1, ID1, USR2, VersionableEntityAction.Read);
-    Set<Version> expectedViewableVersions = new HashSet<>();
-    expectedViewableVersions.addAll(expectedViewableVersionsType1Id1);
-    expectedViewableVersions.add(VERSION02);
-    assretVersionInfo(versionInfo, VERSION02, VersionStatus.Locked, USR2, expectedViewableVersions,
-        null);
-  }
-
-//  @Test(dependsOnMethods = "getVersionInfoForReadOnLockedSameUserTest")
-  public void getVersionInfoForReadOnLockedOtherUserTest() {
-    VersionInfo entityVersionInfo =
-        versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Read);
-    Assert.assertEquals(entityVersionInfo.getActiveVersion(), VERSION01);
-  }
-
-//  @Test(dependsOnMethods = "getVersionInfoForReadOnLockedOtherUserTest",
-//      expectedExceptions = CoreException.class)
-  public void getVersionInfoForWriteOnLockedOtherUserTest() {
-    versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Write)
-        .getActiveVersion();
-  }
-
-//  @Test(dependsOnMethods = "getVersionInfoForWriteOnLockedOtherUserTest")
-  public void getVersionInfoForWriteOnLockedSameUserTest() {
-    Version activeVersion =
-        versioningManager.getEntityVersionInfo(TYPE1, ID1, USR2, VersionableEntityAction.Write)
-            .getActiveVersion();
-    Assert.assertEquals(activeVersion, VERSION02);
-  }
-
-//  @Test(dependsOnMethods = "getVersionInfoForWriteOnLockedSameUserTest",
-//      expectedExceptions = CoreException.class)
-  public void checkoutOnLockedSameUserTest() {
-    versioningManager.checkout(TYPE1, ID1, USR2);
-  }
-
-//  @Test(dependsOnMethods = "checkoutOnLockedSameUserTest", expectedExceptions = CoreException.class)
-  public void checkoutOnLockedOtherUserTest() {
-    versioningManager.checkout(TYPE1, ID1, USR1);
-  }
-
-//  @Test(dependsOnMethods = "checkoutOnLockedSameUserTest", expectedExceptions = CoreException.class)
-  public void undoCheckoutOnLockedOtherUserTest() {
-    versioningManager.undoCheckout(TYPE1, ID1, USR1);
-  }
-
-//  @Test(dependsOnMethods = "undoCheckoutOnLockedOtherUserTest",
-//      expectedExceptions = CoreException.class)
-  public void submitOnLockedTest() {
-    versioningManager.submit(TYPE1, ID1, USR2, "failed submit");
-  }
-
-//  @Test(dependsOnMethods = "submitOnLockedTest")
-  public void undoCheckoutTest() {
-    Version version = versioningManager.undoCheckout(TYPE1, ID1, USR2);
-    Assert.assertEquals(version, VERSION01);
-
-    VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, null, null,
-        VersionStatus.Available, expectedViewableVersionsType1Id1, null);
-
-    ResultSet results =
-        loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
-            VERSION02);
-    Assert.assertFalse(results.iterator().hasNext());
-  }
-
-//  @Test(dependsOnMethods = "undoCheckoutTest")
-  public void submitTest() {
-    Version version = versioningManager.submit(TYPE1, ID1, USR3, "submit msg");
-    Assert.assertEquals(version, VERSION10);
-    expectedViewableVersionsType1Id1 = new HashSet<>();
-    expectedViewableVersionsType1Id1.add(version);
-
-    VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION10, null, null,
-        VersionStatus.Final, expectedViewableVersionsType1Id1, VERSION10);
-
-    ResultSet results =
-        loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
-            VERSION10);
-    Assert.assertTrue(results.iterator().hasNext());
-  }
-
-//  @Test(dependsOnMethods = "submitTest", expectedExceptions = CoreException.class)
-  public void checkinOnFinalizedTest() {
-    versioningManager.checkin(TYPE1, ID1, USR2, "failed checkin");
-  }
-
-//  @Test(dependsOnMethods = "checkinOnFinalizedTest", expectedExceptions = CoreException.class)
-  public void undoCheckouOnFinalizedTest() {
-    versioningManager.undoCheckout(TYPE1, ID1, USR2);
-  }
-
-//  @Test(dependsOnMethods = "undoCheckouOnFinalizedTest", expectedExceptions = CoreException.class)
-  public void submitOnFinalizedTest() {
-    versioningManager.submit(TYPE1, ID1, USR2, "failed submit");
-  }
-
-//  @Test(dependsOnMethods = "submitOnFinalizedTest")
-  public void checkoutOnFinalizedTest() {
-    Version version = versioningManager.checkout(TYPE1, ID1, USR3);
-    Assert.assertEquals(version, VERSION11);
-
-    VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION10, VERSION11, USR3,
-        VersionStatus.Locked, expectedViewableVersionsType1Id1, VERSION10);
-
-    ResultSet results =
-        loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
-            VERSION11);
-    Assert.assertTrue(results.iterator().hasNext());
-  }
-
-//  @Test(dependsOnMethods = "checkoutOnFinalizedTest")
-  public void viewableVersionsTest() {
-    versioningManager.checkin(TYPE1, ID1, USR3, "check in 1.1");
-    versioningManager.checkout(TYPE1, ID1, USR3);
-    versioningManager.checkin(TYPE1, ID1, USR3, "check in 1.2");
-    versioningManager.submit(TYPE1, ID1, USR3, "submit in 2.0");
-    versioningManager.checkout(TYPE1, ID1, USR3);
-    versioningManager.checkin(TYPE1, ID1, USR3, "check in 2.1");
-    versioningManager.submit(TYPE1, ID1, USR3, "submit in 3.0");
-    versioningManager.checkout(TYPE1, ID1, USR3);
-    versioningManager.checkin(TYPE1, ID1, USR3, "check in 3.1");
-    versioningManager.checkout(TYPE1, ID1, USR3);
-    versioningManager.checkin(TYPE1, ID1, USR3, "check in 3.2");
-    versioningManager.checkout(TYPE1, ID1, USR2);
-
-    VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    HashSet<Version> expectedViewableVersions = new HashSet<>();
-    expectedViewableVersions.add(VERSION10);
-    expectedViewableVersions.add(new Version(2, 0));
-    expectedViewableVersions.add(new Version(3, 0));
-    expectedViewableVersions.add(new Version(3, 1));
-    expectedViewableVersions.add(new Version(3, 2));
-    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, new Version(3, 2), new Version(3, 3),
-        USR2, VersionStatus.Locked, expectedViewableVersions, new Version(3, 0));
-  }
-
-//  @Test(dependsOnMethods = "viewableVersionsTest")
-  public void listActiveVersionsTest() {
-    versioningManager.create(TYPE1, ID2, USR3);
-    versioningManager.checkin(TYPE1, ID2, USR3, "check in 0.1");
-
-    versioningManager.create(TYPE2, ID3, USR3);
-    versioningManager.checkin(TYPE2, ID3, USR3, "check in 0.1");
-
-    Map<String, VersionInfo> idToVersionInfo =
-        versioningManager.listEntitiesVersionInfo(TYPE1, USR2, VersionableEntityAction.Read);
-    Assert.assertEquals(idToVersionInfo.size(), 2);
-    Assert.assertEquals(idToVersionInfo.get(ID1).getActiveVersion(), new Version(3, 3));
-    Assert.assertEquals(idToVersionInfo.get(ID2).getActiveVersion(), VERSION01);
-  }
-
-//  @Test(dependsOnMethods = "listActiveVersionsTest")
-  public void deleteTest() {
-    versioningManager.checkin(TYPE1, ID1, USR2, "check in for delete");
-    versioningManager.delete(TYPE1, ID1, USR1);
-
-    VersionInfoDeletedEntity versionInfoDeletedEntity =
-        versionInfoDeletedDao.get(new VersionInfoDeletedEntity(TYPE1, ID1));
-    Assert.assertNotNull(versionInfoDeletedEntity);
-
-    Map<String, VersionInfo> entitiesInfoMap =
-        versioningManager.listDeletedEntitiesVersionInfo(TYPE1, USR2, null);
-    Assert.assertEquals(entitiesInfoMap.size(), 1);
-    VersionInfoEntity versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    Assert.assertNull(versionInfoEntity);
-    versioningManager.undoDelete(TYPE1, ID1, USR1);
-    versionInfoEntity = versionInfoDao.get(new VersionInfoEntity(TYPE1, ID1));
-    Assert.assertNotNull(versionInfoEntity);
-
-
-  }
-
-  private void createVersionableEntityRecord(String tableName, String idName, String versionName,
-                                             String id, Version version) {
-    noSqlDb.execute(
-        String.format("insert into %s (%s,%s) values (?,?)", tableName, idName, versionName), id,
-        versionMapper.toUDT(version));
-  }
-
-  private ResultSet loadVersionableEntityRecord(String tableName, String idName, String versionName,
-                                                String id, Version version) {
-    return noSqlDb.execute(
-        String.format("select * from %s where %s=? and %s=?", tableName, idName, versionName), id,
-        versionMapper.toUDT(version));
-  }
-}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java
new file mode 100644
index 0000000..d4bccc6
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/java/org/openecomp/sdc/versioning/impl/VersioningManagerImplTest.java
@@ -0,0 +1,558 @@
+/*-
+ * ============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
+ * 
+ * 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=========================================================
+ */
+
+package org.openecomp.sdc.versioning.impl;
+
+
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.sdc.common.errors.CoreException;
+import org.openecomp.sdc.versioning.dao.VersionInfoDao;
+import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao;
+import org.openecomp.sdc.versioning.dao.VersionableEntityDao;
+import org.openecomp.sdc.versioning.dao.types.UserCandidateVersion;
+import org.openecomp.sdc.versioning.dao.types.Version;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
+import org.openecomp.sdc.versioning.dao.types.VersionStatus;
+import org.openecomp.sdc.versioning.types.VersionInfo;
+import org.openecomp.sdc.versioning.types.VersionableEntityAction;
+import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.verify;
+
+public class VersioningManagerImplTest {
+  private static final String USR1 = "usr1";
+  private static final String USR2 = "usr2";
+  private static final String TYPE1 = "Type1";
+/*  private static final String TYPE2 = "Type2";*/
+  private static final String ID1 = "Id1";
+/*  private static final String ID2 = "Id2";
+  private static final String ID3 = "Id3";
+  private static final String TYPE1_TABLE_NAME = "vendor_license_model";
+  private static final String TYPE1_ID_NAME = "vlm_id";
+  private static final String TYPE1_VERSION_NAME = "version";
+  private static final String TYPE2_TABLE_NAME = "feature_group";
+  private static final String TYPE2_ID_NAME = "vlm_id";
+  private static final String TYPE2_VERSION_NAME = "version";*/
+  private static final Version VERSION0 = new Version(0, 0);
+  private static final Version VERSION01 = new Version(0, 1);
+  private static final Version VERSION02 = new Version(0, 2);
+  private static final Version VERSION10 = new Version(1, 0);
+  private static final Version VERSION11 = new Version(1, 1);
+
+  /*  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
+
+    private static UDTMapper<Version> versionMapper =
+        noSqlDb.getMappingManager().udtMapper(Version.class);*/
+  @Mock
+  private VersionInfoDao versionInfoDaoMock;
+  @Mock
+  private VersionInfoDeletedDao versionInfoDeletedDaoMock;
+  @InjectMocks
+  private VersioningManagerImpl versioningManager;
+
+  @Captor
+  private ArgumentCaptor<VersionInfoEntity> versionInfoEntityArg;
+
+  @BeforeMethod
+  public void setUp() throws Exception {
+    MockitoAnnotations.initMocks(this);
+  }
+
+  /*  @BeforeClass
+    private void init() {
+      versionInfoDaoMock.delete(new VersionInfoEntity(TYPE1, ID1));
+      versionInfoDaoMock.delete(new VersionInfoEntity(TYPE1, ID2));
+      versionInfoDaoMock.delete(new VersionInfoEntity(TYPE2, ID3));
+      String deleteFromType1 = String
+          .format("delete from %s where %s=? and %s=?", TYPE1_TABLE_NAME, TYPE1_ID_NAME,
+              TYPE1_VERSION_NAME);
+      noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION01));
+      noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION02));
+      noSqlDb.execute(deleteFromType1, ID1, versionMapper.toUDT(VERSION11));
+
+      versioningManager.register(TYPE1,
+          new VersionableEntityMetadata(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME));
+      versioningManager.register(TYPE2,
+          new VersionableEntityMetadata(TYPE2_TABLE_NAME, TYPE2_ID_NAME, TYPE2_VERSION_NAME));
+    }*/
+
+/*  @Test
+  public void testRegister() throws Exception {
+    VersionableEntityMetadata entityMetadata =
+        new VersionableEntityMetadata(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME);
+    versioningManager.register(TYPE1, entityMetadata);
+
+    Map<String, Set<VersionableEntityMetadata>> versionableEntities =
+        versionableEntitiesCapture.capture();
+    Set<VersionableEntityMetadata> type1Entities = versionableEntities.get(TYPE1);
+    Assert.assertNotNull(type1Entities);
+    Assert.assertTrue(type1Entities.contains(entityMetadata));
+  }*/
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testCreateAlreadyExisting() {
+    doReturn(new VersionInfoEntity()).when(versionInfoDaoMock).get(anyObject());
+    versioningManager.create(TYPE1, ID1, USR1);
+  }
+
+  @Test
+  public void testCreate() {
+    Version version = versioningManager.create(TYPE1, ID1, USR1);
+    Assert.assertEquals(version, VERSION01);
+
+/*    createVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+        version);*/
+    verify(versionInfoDaoMock).create(versionInfoEntityArg.capture());
+    VersionInfoEntity versionInfoEntity = versionInfoEntityArg.getValue();
+    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, new Version(0, 0), VERSION01, USR1,
+        VersionStatus.Locked, new HashSet<>(), null);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testDeleteNonExisting() {
+    versioningManager.delete(TYPE1, ID1, USR1);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testDeleteLocked() {
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION0,
+        new UserCandidateVersion(USR1, VERSION01), Collections.emptySet(), null);
+    versioningManager.delete(TYPE1, ID1, USR1);
+  }
+
+  @Test
+  public void testDelete() {
+    VersionInfoEntity versionInfoEntity = new VersionInfoEntity();
+    versionInfoEntity.setStatus(VersionStatus.Available);
+    doReturn(versionInfoEntity).when(versionInfoDaoMock).get(anyObject());
+
+    versioningManager.delete(TYPE1, ID1, USR1);
+
+    verify(versionInfoDaoMock).delete(versionInfoEntity);
+    ArgumentCaptor<VersionInfoDeletedEntity> versionInfoDeletedEntityArg =
+        ArgumentCaptor.forClass(VersionInfoDeletedEntity.class);
+    verify(versionInfoDeletedDaoMock).create(versionInfoDeletedEntityArg.capture());
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testUndoDeleteNonExisting() {
+    versioningManager.undoDelete(TYPE1, ID1, USR1);
+  }
+
+  @Test
+  public void testUndoDelete() {
+    VersionInfoDeletedEntity versionInfoDeletedEntity = new VersionInfoDeletedEntity();
+    versionInfoDeletedEntity.setStatus(VersionStatus.Available);
+    doReturn(versionInfoDeletedEntity).when(versionInfoDeletedDaoMock).get(anyObject());
+
+    versioningManager.undoDelete(TYPE1, ID1, USR1);
+
+    verify(versionInfoDeletedDaoMock).delete(versionInfoDeletedEntity);
+    verify(versionInfoDaoMock).create(versionInfoEntityArg.capture());
+/*
+    VersionInfoDeletedEntity versionInfoDeletedEntity =
+        versionInfoDeletedDaoMock.get(new VersionInfoDeletedEntity(TYPE1, ID1));
+    Assert.assertNotNull(versionInfoDeletedEntity);
+
+    Map<String, VersionInfo> entitiesInfoMap =
+        versioningManager.listDeletedEntitiesVersionInfo(TYPE1, USR2, null);
+    Assert.assertEquals(entitiesInfoMap.size(), 1);
+    VersionInfoEntity versionInfoEntity = versionInfoDaoMock.get(new VersionInfoEntity(TYPE1, ID1));
+    Assert.assertNull(versionInfoEntity);
+    versioningManager.undoDelete(TYPE1, ID1, USR1);
+    versionInfoEntity = versionInfoDaoMock.get(new VersionInfoEntity(TYPE1, ID1));
+    Assert.assertNotNull(versionInfoEntity);*/
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testCheckoutNonExisting() {
+    versioningManager.checkout(TYPE1, ID1, USR2);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testCheckoutOnLockedSameUser() {
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION0,
+        new UserCandidateVersion(USR1, VERSION01), Collections.emptySet(), null);
+    versioningManager.checkout(TYPE1, ID1, USR1);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testCheckoutOnLockedOtherUser() {
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION0,
+        new UserCandidateVersion(USR2, VERSION01), Collections.emptySet(), null);
+    versioningManager.checkout(TYPE1, ID1, USR1);
+  }
+
+  @Test
+  public void testCheckoutOnFinalized() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION10);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Final, VERSION10, null, viewableVersions,
+        VERSION10);
+
+    Version version = versioningManager.checkout(TYPE1, ID1, USR1);
+    Assert.assertEquals(version, VERSION11);
+
+    VersionInfoEntity versionInfoEntity = versionInfoDaoMock.get(new VersionInfoEntity(TYPE1, ID1));
+    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION10, VERSION11, USR1,
+        VersionStatus.Locked, viewableVersions, VERSION10);
+/*
+    ResultSet results =
+        loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+            VERSION11);
+    Assert.assertTrue(results.iterator().hasNext());*/
+  }
+
+  @Test
+  public void testCheckout() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Available, VERSION01, null, viewableVersions,
+        null);
+
+    Version version = versioningManager.checkout(TYPE1, ID1, USR1);
+    Assert.assertEquals(version, VERSION02);
+
+    verify(versionInfoDaoMock).update(versionInfoEntityArg.capture());
+    VersionInfoEntity versionInfoEntity = versionInfoEntityArg.getValue();
+
+    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, VERSION02, USR1,
+        VersionStatus.Locked, viewableVersions, null);
+
+/*    ResultSet results =
+        loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+            VERSION02);
+    Assert.assertTrue(results.iterator().hasNext());*/
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testUndoCheckoutNonExisting() {
+    versioningManager.undoCheckout(TYPE1, ID1, USR1);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testUndoCheckoutOnAvailable() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Available, VERSION01, null, viewableVersions,
+        null);
+
+    versioningManager.undoCheckout(TYPE1, ID1, USR1);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testUndoCheckouOnFinalized() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION10);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Final, VERSION10, null, viewableVersions,
+        VERSION10);
+    versioningManager.undoCheckout(TYPE1, ID1, USR2);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testUndoCheckoutOnLockedOtherUser() {
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION0,
+        new UserCandidateVersion(USR2, VERSION01), Collections.emptySet(), null);
+
+    versioningManager.undoCheckout(TYPE1, ID1, USR1);
+  }
+
+  @Test
+  public void testUndoCheckout() {
+    HashSet<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION01,
+        new UserCandidateVersion(USR1, VERSION02), viewableVersions, null);
+
+    Version version = versioningManager.undoCheckout(TYPE1, ID1, USR1);
+    Assert.assertEquals(version, VERSION01);
+
+    VersionInfoEntity versionInfoEntity = versionInfoDaoMock.get(new VersionInfoEntity(TYPE1, ID1));
+    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, null, null,
+        VersionStatus.Available, viewableVersions, null);
+
+/*    ResultSet results =
+        loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+            VERSION02);
+    Assert.assertFalse(results.iterator().hasNext());*/
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testCheckinNonExisting() {
+    versioningManager.checkin(TYPE1, ID1, USR1, "");
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testCheckinOnAvailable() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Available, VERSION01, null, viewableVersions,
+        null);
+
+    versioningManager.checkin(TYPE1, ID1, USR1, "fail checkin");
+  }
+
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testCheckinOnFinalized() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION10);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Final, VERSION10, null, viewableVersions,
+        VERSION10);
+
+    versioningManager.checkin(TYPE1, ID1, USR1, "failed checkin");
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testCheckinOnLockedOtherUser() {
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION0,
+        new UserCandidateVersion(USR2, VERSION01), Collections.emptySet(), null);
+
+    versioningManager.checkin(TYPE1, ID1, USR1, "");
+  }
+
+  @Test
+  public void testCheckin() {
+    HashSet<Version> viewableVersions = new HashSet<>();
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION0,
+        new UserCandidateVersion(USR1, VERSION01), viewableVersions, null);
+
+    Version version = versioningManager.checkin(TYPE1, ID1, USR1, "checkin 0.1");
+    Assert.assertEquals(version, VERSION01);
+
+    verify(versionInfoDaoMock).update(versionInfoEntityArg.capture());
+    VersionInfoEntity versionInfoEntity = versionInfoEntityArg.getValue();
+
+    viewableVersions.add(VERSION01);
+    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, VERSION01, null, null,
+        VersionStatus.Available, viewableVersions, null);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testSubmitNonExisting() {
+    versioningManager.submit(TYPE1, ID1, USR2, "failed submit");
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testSubmitOnLocked() {
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION0,
+        new UserCandidateVersion(USR1, VERSION01), Collections.emptySet(), null);
+    versioningManager.submit(TYPE1, ID1, USR2, "failed submit");
+  }
+
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testSubmitOnFinalized() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION10);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Final, VERSION10, null, viewableVersions,
+        VERSION10);
+    versioningManager.submit(TYPE1, ID1, USR2, "failed submit");
+  }
+
+  @Test
+  public void testSubmit() {
+    Version version32 = new Version(3, 2);
+    Version version40 = new Version(4, 0);
+
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION10);
+    viewableVersions.add(new Version(2, 0));
+    viewableVersions.add(new Version(3, 0));
+    viewableVersions.add(new Version(3, 1));
+    viewableVersions.add(version32);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Available, version32, null, viewableVersions,
+        new Version(3, 0));
+
+    Version version = versioningManager.submit(TYPE1, ID1, USR1, "submit msg");
+    Assert.assertEquals(version, version40);
+    viewableVersions.remove(new Version(3, 1));
+    viewableVersions.remove(version32);
+    viewableVersions.add(version40);
+
+    verify(versionInfoDaoMock).update(versionInfoEntityArg.capture());
+    VersionInfoEntity versionInfoEntity = versionInfoEntityArg.getValue();
+
+    assretVersionInfoEntity(versionInfoEntity, TYPE1, ID1, version40, null, null,
+        VersionStatus.Final, viewableVersions, version40);
+
+/*    ResultSet results =
+        loadVersionableEntityRecord(TYPE1_TABLE_NAME, TYPE1_ID_NAME, TYPE1_VERSION_NAME, ID1,
+            VERSION10);
+    Assert.assertTrue(results.iterator().hasNext());*/
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testGetVersionInfoOnNonExistingEntity() {
+    versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Read);
+  }
+
+  @Test
+  public void testGetVersionInfoForReadOnAvailable() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Available, VERSION01, null, viewableVersions,
+        null);
+
+    VersionInfo versionInfo =
+        versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Read);
+    assertVersionInfo(versionInfo, VERSION01, VersionStatus.Available, null,
+        viewableVersions, null);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testGetVersionInfoForWriteOnAvailable() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Available, VERSION01, null, viewableVersions,
+        null);
+
+    versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Write);
+  }
+
+  @Test
+  public void testGetVersionInfoForReadOnLockedSameUser() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION01,
+        new UserCandidateVersion(USR1, VERSION02), viewableVersions, null);
+
+    VersionInfo versionInfo =
+        versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Read);
+    viewableVersions.add(VERSION02);
+    assertVersionInfo(versionInfo, VERSION02, VersionStatus.Locked, USR1, viewableVersions, null);
+  }
+
+  @Test
+  public void testGetVersionInfoForReadOnLockedOtherUser() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION01,
+        new UserCandidateVersion(USR2, VERSION02), viewableVersions, null);
+
+    VersionInfo versionInfo =
+        versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Read);
+    Assert.assertEquals(versionInfo.getActiveVersion(), VERSION01);
+    assertVersionInfo(versionInfo, VERSION01, VersionStatus.Locked, USR2, viewableVersions, null);
+  }
+
+  @Test(expectedExceptions = CoreException.class)
+  public void testGetVersionInfoForWriteOnLockedOtherUser() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION01,
+        new UserCandidateVersion(USR2, VERSION02), viewableVersions, null);
+
+    versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Write);
+  }
+
+  @Test
+  public void testGetVersionInfoForWriteOnLockedSameUser() {
+    Set<Version> viewableVersions = new HashSet<>();
+    viewableVersions.add(VERSION01);
+    mockVersionInfoEntity(TYPE1, ID1, VersionStatus.Locked, VERSION01,
+        new UserCandidateVersion(USR1, VERSION02), viewableVersions, null);
+
+    VersionInfo versionInfo =
+        versioningManager.getEntityVersionInfo(TYPE1, ID1, USR1, VersionableEntityAction.Write);
+    viewableVersions.add(VERSION02);
+    assertVersionInfo(versionInfo, VERSION02, VersionStatus.Locked, USR1, viewableVersions, null);
+  }
+
+/*  private void createVersionableEntityRecord(String tableName, String idName, String versionName,
+                                             String id, Version version) {
+    noSqlDb.execute(
+        String.format("insert into %s (%s,%s) values (?,?)", tableName, idName, versionName), id,
+        versionMapper.toUDT(version));
+  }
+
+  private ResultSet loadVersionableEntityRecord(String tableName, String idName, String versionName,
+                                                String id, Version version) {
+    return noSqlDb.execute(
+        String.format("select * from %s where %s=? and %s=?", tableName, idName, versionName), id,
+        versionMapper.toUDT(version));
+  }*/
+
+
+  private static void assretVersionInfoEntity(VersionInfoEntity actual, String entityType,
+                                              String entityId, Version activeVersion,
+                                              Version candidateVersion, String candidateUser,
+                                              VersionStatus status, Set<Version> viewbleVersions,
+                                              Version latestFinalVersion) {
+    Assert.assertNotNull(actual);
+    Assert.assertEquals(actual.getEntityType(), entityType);
+    Assert.assertEquals(actual.getEntityId(), entityId);
+    Assert.assertEquals(actual.getActiveVersion(), activeVersion);
+    if (candidateVersion != null && candidateUser != null) {
+      Assert.assertEquals(actual.getCandidate().getVersion(), candidateVersion);
+      Assert.assertEquals(actual.getCandidate().getUser(), candidateUser);
+    } else {
+      Assert.assertNull(actual.getCandidate());
+    }
+    Assert.assertEquals(actual.getStatus(), status);
+    Assert.assertEquals(actual.getViewableVersions().size(), viewbleVersions.size());
+    Assert.assertEquals(actual.getViewableVersions(), viewbleVersions);
+    Assert.assertEquals(actual.getLatestFinalVersion(), latestFinalVersion);
+  }
+
+  private static void assertVersionInfo(VersionInfo actual, Version activeVersion,
+                                        VersionStatus status, String lockingUser,
+                                        Set<Version> viewableVersions, Version latestFinalVersion) {
+    Assert.assertNotNull(actual);
+    Assert.assertEquals(actual.getActiveVersion(), activeVersion);
+    Assert.assertEquals(actual.getStatus(), status);
+    Assert.assertEquals(actual.getLockingUser(), lockingUser);
+    Assert.assertEquals(actual.getViewableVersions().size(), viewableVersions.size());
+    Assert.assertEquals(actual.getViewableVersions(), viewableVersions);
+    Assert.assertEquals(actual.getLatestFinalVersion(), latestFinalVersion);
+  }
+
+  private VersionInfoEntity mockVersionInfoEntity(String entityType, String entityId,
+                                                  VersionStatus status, Version activeVersion,
+                                                  UserCandidateVersion candidate,
+                                                  Set<Version> viewableVersions,
+                                                  Version latestFinalVersion) {
+    VersionInfoEntity mock = new VersionInfoEntity();
+    mock.setEntityType(entityType);
+    mock.setEntityId(entityId);
+    mock.setStatus(status);
+    mock.setActiveVersion(activeVersion);
+    mock.setCandidate(candidate);
+    mock.setViewableVersions(viewableVersions);
+    mock.setLatestFinalVersion(latestFinalVersion);
+
+    doReturn(mock).when(versionInfoDaoMock).get(anyObject());
+    return mock;
+  }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/resources/logback.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/resources/logback.xml
new file mode 100644
index 0000000..c1932e3
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/test/resources/logback.xml
@@ -0,0 +1,15 @@
+<configuration>
+
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- encoders are assigned the type
+             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="warn">
+        <appender-ref ref="STDOUT" />
+    </root>
+
+</configuration>
\ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml
index 94b2729..32c8207 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml
@@ -1,17 +1,19 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
+    <name>openecomp-sdc-versioning-lib</name>
+    <artifactId>openecomp-sdc-versioning-lib</artifactId>
+    <packaging>pom</packaging>
+
     <parent>
         <artifactId>openecomp-sdc-lib</artifactId>
         <groupId>org.openecomp.sdc</groupId>
         <version>1.1.0-SNAPSHOT</version>
+        <relativePath>..</relativePath>
     </parent>
 
-    <artifactId>openecomp-sdc-versioning-lib</artifactId>
-    <packaging>pom</packaging>
-    <name>openecomp-sdc-versioning-lib</name>
-
     <modules>
         <module>openecomp-sdc-versioning-api</module>
         <module>openecomp-sdc-versioning-core</module>
@@ -20,4 +22,4 @@
     <dependencies>
 
     </dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml.versionsBackup b/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml.versionsBackup
new file mode 100644
index 0000000..7804ebf
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/pom.xml.versionsBackup
@@ -0,0 +1,24 @@
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <name>openecomp-sdc-versioning-lib</name>
+    <artifactId>openecomp-sdc-versioning-lib</artifactId>
+
+    <packaging>pom</packaging>
+    <parent>
+        <artifactId>openecomp-sdc-lib</artifactId>
+        <groupId>org.openecomp.sdc</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <modules>
+        <module>openecomp-sdc-versioning-api</module>
+        <module>openecomp-sdc-versioning-core</module>
+    </modules>
+
+    <dependencies>
+
+    </dependencies>
+</project>
\ No newline at end of file
