diff --git a/common/src/main/java/org/openecomp/mso/db/AbstractSessionFactoryManager.java b/common/src/main/java/org/openecomp/mso/db/AbstractSessionFactoryManager.java
new file mode 100644
index 0000000..3efd6e2
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/db/AbstractSessionFactoryManager.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * 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.mso.db;
+
+import org.hibernate.cfg.Configuration;
+import org.hibernate.SessionFactory;
+import org.hibernate.service.ServiceRegistry;
+import org.openecomp.mso.properties.MsoDatabaseException;
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
+import java.net.URL;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+public abstract class AbstractSessionFactoryManager {
+
+    protected static Map<String, SessionFactory> sessionFactories = new ConcurrentHashMap<String, SessionFactory>();
+
+    protected synchronized SessionFactory initializeSessionFactory(URL hibernateConfigFile)
+            throws MsoDatabaseException {
+        try {
+            if (hibernateConfigFile != null) {
+                SessionFactory tempFactory = sessionFactories.get(hibernateConfigFile.getPath());
+                // Already initialized, skip
+                if (tempFactory != null) {
+                    return tempFactory;
+                }
+
+                Configuration conf = new Configuration().configure(hibernateConfigFile);
+                ServiceRegistry sr = new StandardServiceRegistryBuilder().applySettings(conf.getProperties()).build();
+                tempFactory = conf.buildSessionFactory(sr);
+                if (tempFactory == null) {
+                    throw new MsoDatabaseException(
+                            "SessionFactory can't be initialized, method buildSessionFactory returned null !");
+                }
+                sessionFactories.put(hibernateConfigFile.getPath(), tempFactory);
+                return tempFactory;
+            } else {
+                throw new MsoDatabaseException(
+                        "HibernateConfigFile provided is null, therefore Hibernate can't be initialized !");
+            }
+        } catch (Exception e) {
+            throw new MsoDatabaseException("Exception occurred during the SessionFactory Build", e);
+        }
+    }
+
+    public SessionFactory getSessionFactory() throws MsoDatabaseException {
+        URL hibernateConfigFile = getHibernateConfigFile();
+        SessionFactory factory = sessionFactories.get(hibernateConfigFile.getPath());
+        if (factory == null) {
+            factory = initializeSessionFactory(hibernateConfigFile);
+        }
+        return factory;
+    }
+
+    protected abstract URL getHibernateConfigFile();
+}
diff --git a/common/src/main/java/org/openecomp/mso/db/HibernateUtils.java b/common/src/main/java/org/openecomp/mso/db/HibernateUtils.java
deleted file mode 100644
index ba452ff..0000000
--- a/common/src/main/java/org/openecomp/mso/db/HibernateUtils.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * OPENECOMP - MSO
- * ================================================================================
- * 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.mso.db;
-
-import org.hibernate.cfg.Configuration;
-import org.hibernate.SessionFactory;
-import org.hibernate.service.ServiceRegistry;
-import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
-import java.net.URL;
-
-public abstract class HibernateUtils {
-
-    protected SessionFactory sessionFactory;
-    
-    protected synchronized void initializeHibernate(URL hibernateConfigFile) {
-        // Can be null, in that case, we skip the loading
-        if (hibernateConfigFile != null) {
-            // Already initialized, skip
-            if (sessionFactory != null) {
-                return;
-            }
-    
-            Configuration conf = new Configuration().configure(hibernateConfigFile);
-            ServiceRegistry sr = new StandardServiceRegistryBuilder().applySettings(conf.getProperties()).build();
-            sessionFactory = conf.buildSessionFactory(sr);
-        }
-    }
-
-    public SessionFactory getSessionFactory() {
-        if (sessionFactory == null) {
-            initializeHibernate(getHibernateConfigFile());
-        }
-        return sessionFactory;
-    }
-
-    protected abstract URL getHibernateConfigFile();
-}
diff --git a/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java b/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java
index 521aa50..ee0e294 100644
--- a/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java
+++ b/common/src/main/java/org/openecomp/mso/logger/MessageEnum.java
@@ -167,7 +167,6 @@
 	BPMN_GENERAL_METRICS,
 	BPMN_URN_MAPPING_FAIL,
 	BPMN_VARIABLE_NULL,
-	BPMN_SDNC_CALLBACK_EXCEPTION,
 	BPMN_CALLBACK_EXCEPTION,
 	// ASDC Messages
 	ASDC_GENERAL_EXCEPTION_ARG,
diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java b/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
index e9b6fb1..a0fc765 100644
--- a/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
+++ b/common/src/main/java/org/openecomp/mso/logger/MsoLogger.java
@@ -106,7 +106,7 @@
     public enum ResponseCode {
         Suc(0), PermissionError(100), DataError(300), DataNotFound(301), BadRequest(302), SchemaError(
                 400), BusinessProcesssError(500), ServiceNotAvailable(501), InternalError(
-                502), Conflict(503), DBAccessError(504), CommunicationError(505), UnknownError(900);
+                        502), Conflict(503), DBAccessError(504), CommunicationError(505), UnknownError(900);
 
         private int value;
 
@@ -144,8 +144,8 @@
     private static final Logger LOGGER      = Logger.getLogger(MsoLogger.class.getName());
 
     private MsoLogger(MsoLogger.Catalog cat) {
-        this.debugLogger = EELFManager.getInstance().getDebugLogger();
-        this.errorLogger = EELFManager.getInstance().getErrorLogger();
+    	this.debugLogger = EELFManager.getInstance().getDebugLogger();
+    	this.errorLogger = EELFManager.getInstance().getErrorLogger();
         this.auditLogger = EELFManager.getInstance().getAuditLogger();
         this.metricsLogger = EELFManager.getInstance().getMetricsLogger();
         MsoLogger.initialization();
@@ -172,7 +172,7 @@
 
     /**
      * Get the MsoLogger based on the catalog
-     *
+     * 
      * @param cat
      *            Catalog of the logger
      * @return the MsoLogger
@@ -183,7 +183,7 @@
 
     /**
      * Record the Metrics event with no argument
-     *
+     * 
      * @param startTime
      *            Transaction starting time in millieseconds
      * @param statusCode
@@ -200,7 +200,7 @@
      *            Target VNF or VM acted opon by the component, if available
      */
     public void recordMetricEvent(Long startTime, StatusCode statusCode, ResponseCode responseCode, String responseDesc,
-                                  String targetEntity, String targetServiceName, String targetVEntity) {
+            String targetEntity, String targetServiceName, String targetVEntity) {
         prepareMetricMsg(startTime, statusCode, responseCode.getValue(), responseDesc, targetEntity, targetServiceName,
                 targetVEntity);
         metricsLogger.info("");
@@ -222,7 +222,7 @@
      *            Human redable description of the application response code
      */
     public void recordAuditEvent(Long startTime, StatusCode statusCode, ResponseCode responseCode,
-                                 String responseDesc) {
+            String responseDesc) {
         prepareAuditMsg(startTime, statusCode, responseCode.getValue(), responseDesc);
         auditLogger.info("");
         MDC.remove(TIMER);
@@ -293,7 +293,7 @@
      *            The arguments used in the log message
      */
     public void info(EELFResolvableErrorEnum msg, String arg0, String arg1, String targetEntity,
-                     String targetServiceName) {
+            String targetServiceName) {
         prepareErrorMsg(INFO_LEVEL, targetEntity, targetServiceName, null, "");
 
         debugLogger.info(msg, normalize(arg0), normalize(arg1));
@@ -310,7 +310,7 @@
      *            The arguments used in the log message
      */
     public void info(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String targetEntity,
-                     String targetServiceName) {
+            String targetServiceName) {
         prepareErrorMsg(INFO_LEVEL, targetEntity, targetServiceName, null, "");
 
         debugLogger.info(msg, normalize(arg0), normalize(arg1), normalize(arg2));
@@ -327,7 +327,7 @@
      *            The arguments used in the log message
      */
     public void info(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3,
-                     String targetEntity, String targetServiceName) {
+            String targetEntity, String targetServiceName) {
         prepareErrorMsg(INFO_LEVEL, targetEntity, targetServiceName, null, "");
 
         debugLogger.info(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
@@ -344,7 +344,7 @@
      *            The arguments used in the log message
      */
     public void info(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4,
-                     String targetEntity, String targetServiceName) {
+            String targetEntity, String targetServiceName) {
         prepareErrorMsg(INFO_LEVEL, targetEntity, targetServiceName, null, "");
 
         debugLogger.info(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
@@ -361,7 +361,7 @@
      *            The arguments used in the log message
      */
     public void info(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4,
-                     String arg5, String targetEntity, String targetServiceName) {
+            String arg5, String targetEntity, String targetServiceName) {
         prepareErrorMsg(INFO_LEVEL, targetEntity, targetServiceName, null, "");
 
         debugLogger.info(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4),
@@ -378,7 +378,7 @@
      *            The log message to put
      */
     public void warn(EELFResolvableErrorEnum msg, String targetEntity, String targetServiceName, ErrorCode errorCode,
-                     String errorDesc) {
+            String errorDesc) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
 
         errorLogger.warn(msg);
@@ -395,7 +395,7 @@
      *            The exception info
      */
     public void warn(EELFResolvableErrorEnum msg, String targetEntity, String targetServiceName, ErrorCode errorCode,
-                     String errorDesc, Throwable t) {
+            String errorDesc, Throwable t) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg);
         errorLogger.warn("Exception raised: " + getNormalizedStackTrace(t));
@@ -413,7 +413,7 @@
      *            The argument used in the log message
      */
     public void warn(EELFResolvableErrorEnum msg, String arg, String targetEntity, String targetServiceName,
-                     ErrorCode errorCode, String errorDesc) {
+            ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, arg);
         MDC.remove(TARGETENTITY);
@@ -431,7 +431,7 @@
      *            The exception info
      */
     public void warn(EELFResolvableErrorEnum msg, String arg, String targetEntity, String targetServiceName,
-                     ErrorCode errorCode, String errorDesc, Throwable t) {
+            ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, arg);
         errorLogger.warn("Exception raised: " + getNormalizedStackTrace(t));
@@ -449,7 +449,7 @@
      *            The arguments used in the log message
      */
     public void warn(EELFResolvableErrorEnum msg, String arg0, String arg1, String targetEntity,
-                     String targetServiceName, ErrorCode errorCode, String errorDesc) {
+            String targetServiceName, ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, normalize(arg0), normalize(arg1));
         MDC.remove(TARGETENTITY);
@@ -467,7 +467,7 @@
      *            The exception info
      */
     public void warn(EELFResolvableErrorEnum msg, String arg0, String arg1, String targetEntity,
-                     String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+            String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, normalize(arg0), normalize(arg1));
         errorLogger.warn("Exception raised: " + getNormalizedStackTrace(t));
@@ -485,7 +485,7 @@
      *            The arguments used in the log message
      */
     public void warn(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String targetEntity,
-                     String targetServiceName, ErrorCode errorCode, String errorDesc) {
+            String targetServiceName, ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, normalize(arg0), normalize(arg1), normalize(arg2));
         MDC.remove(TARGETENTITY);
@@ -503,7 +503,7 @@
      *            The exception info
      */
     public void warn(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String targetEntity,
-                     String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+            String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, normalize(arg0), normalize(arg1), normalize(arg2));
         errorLogger.warn("Exception raised: " + getNormalizedStackTrace(t));
@@ -521,7 +521,7 @@
      *            The arguments used in the log message
      */
     public void warn(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3,
-                     String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+            String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
         MDC.remove(TARGETENTITY);
@@ -539,7 +539,7 @@
      *            The exception info
      */
     public void warn(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3,
-                     String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+            String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
         errorLogger.warn("Exception raised: " + getNormalizedStackTrace(t));
@@ -557,7 +557,7 @@
      *            The arguments used in the log message
      */
     public void warn(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4,
-                     String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+            String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
         MDC.remove(TARGETENTITY);
@@ -575,7 +575,7 @@
      *            The exception info
      */
     public void warn(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4,
-                     String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+            String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(WARN_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.warn(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
         errorLogger.warn("Exception raised: " + getNormalizedStackTrace(t));
@@ -592,7 +592,7 @@
      *            The log message to put
      */
     public void error(EELFResolvableErrorEnum msg, String targetEntity, String targetServiceName, ErrorCode errorCode,
-                      String errorDesc) {
+            String errorDesc) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg);
         MDC.remove(TARGETENTITY);
@@ -608,7 +608,7 @@
      *            The exception info
      */
     public void error(EELFResolvableErrorEnum msg, String targetEntity, String targetServiceName, ErrorCode errorCode,
-                      String errorDesc, Throwable t) {
+            String errorDesc, Throwable t) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg);
         errorLogger.error(exceptionArg, getNormalizedStackTrace(t));
@@ -626,7 +626,7 @@
      *            The arguments used in the log message
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String targetEntity, String targetServiceName,
-                      ErrorCode errorCode, String errorDesc) {
+            ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0));
         MDC.remove(TARGETENTITY);
@@ -644,7 +644,7 @@
      *            The exception info
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String targetEntity, String targetServiceName,
-                      ErrorCode errorCode, String errorDesc, Throwable t) {
+            ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0));
         errorLogger.error(exceptionArg, getNormalizedStackTrace(t));
@@ -662,7 +662,7 @@
      *            The arguments used in the log message
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String arg1, String targetEntity,
-                      String targetServiceName, ErrorCode errorCode, String errorDesc) {
+            String targetServiceName, ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0), normalize(arg1));
         MDC.remove(TARGETENTITY);
@@ -680,7 +680,7 @@
      *            The exception info
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String arg1, String targetEntity,
-                      String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+            String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0), normalize(arg1));
         errorLogger.error(exceptionArg, getNormalizedStackTrace(t));
@@ -698,7 +698,7 @@
      *            The arguments used in the log message
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String targetEntity,
-                      String targetServiceName, ErrorCode errorCode, String errorDesc) {
+            String targetServiceName, ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0), normalize(arg1), normalize(arg2));
         MDC.remove(TARGETENTITY);
@@ -716,7 +716,7 @@
      *            The exception info
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String targetEntity,
-                      String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+            String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0), normalize(arg1), normalize(arg2));
         errorLogger.error(exceptionArg, getNormalizedStackTrace(t));
@@ -734,7 +734,7 @@
      *            The arguments used in the log message
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3,
-                      String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+            String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
         MDC.remove(TARGETENTITY);
@@ -752,7 +752,7 @@
      *            The exception info
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3,
-                      String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+            String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3));
         errorLogger.error(exceptionArg, getNormalizedStackTrace(t));
@@ -770,7 +770,7 @@
      *            The arguments used in the log message
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4,
-                      String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
+            String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
         MDC.remove(TARGETENTITY);
@@ -788,7 +788,7 @@
      *            The exception info
      */
     public void error(EELFResolvableErrorEnum msg, String arg0, String arg1, String arg2, String arg3, String arg4,
-                      String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
+            String targetEntity, String targetServiceName, ErrorCode errorCode, String errorDesc, Throwable t) {
         prepareErrorMsg(ERROR_LEVEL, targetEntity, targetServiceName, errorCode, errorDesc);
         errorLogger.error(msg, normalize(arg0), normalize(arg1), normalize(arg2), normalize(arg3), normalize(arg4));
         errorLogger.error(exceptionArg, getNormalizedStackTrace(t));
@@ -839,7 +839,7 @@
     }
 
     private void prepareAuditMetricMsg(long startTime, long endTime, StatusCode statusCode, int responseCode,
-                                       String responseDesc) {
+            String responseDesc) {
         Date startDate = new Date(startTime);
         Date endDate = new Date(endTime);
         DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
@@ -852,7 +852,7 @@
     }
 
     private void prepareErrorMsg(String loggingLevel, String targetEntity, String targetServiceName,
-                                 ErrorCode errorCode, String errorDesc) {
+            ErrorCode errorCode, String errorDesc) {
         MDC.put(ALERT_SEVERITY, getSeverityLevel(loggingLevel));
         MDC.put(ERRORCODE, String.valueOf(errorCode));
         MDC.put(ERRORDESC, errorDesc);
@@ -862,7 +862,7 @@
     }
 
     private void prepareMetricMsg(long startTime, StatusCode statusCode, int responseCode, String responseDesc,
-                                  String targetEntity, String targetServiceName, String targetVEntity) {
+            String targetEntity, String targetServiceName, String targetVEntity) {
         long endTime = System.currentTimeMillis();
         prepareMsg(INFO_LEVEL, null, String.valueOf(endTime - startTime));
         prepareAuditMetricMsg(startTime, endTime, statusCode, responseCode, responseDesc);
@@ -1000,7 +1000,7 @@
 
     /**
      * Set the requestId and serviceInstanceId
-     *
+     * 
      * @param reqId
      *            The requestId
      * @param svcId
@@ -1018,7 +1018,7 @@
 
     /**
      * Set the remoteIp and the basic HTTP Authentication user
-     *
+     * 
      * @param remoteIpp
      *            The remote ip address
      * @param userp
@@ -1035,7 +1035,7 @@
 
     /**
      * Set the serviceName
-     *
+     * 
      * @param serviceNamep
      *            The service name
      */
@@ -1048,7 +1048,7 @@
 
     /**
      * Get the serviceName
-     *
+     * 
      * @return The service name
      */
     public static String getServiceName() {
@@ -1064,7 +1064,7 @@
 
     /**
      * Set the requestId and serviceInstanceId based on the mso request
-     *
+     * 
      * @param msoRequest
      *            The mso request
      */
diff --git a/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java b/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java
index 568ab22..c1de64b 100644
--- a/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java
+++ b/common/src/main/java/org/openecomp/mso/logger/MsoLoggingServlet.java
@@ -39,7 +39,11 @@
 import ch.qos.logback.classic.joran.JoranConfigurator;
 import ch.qos.logback.core.Appender;
 
+import com.wordnik.swagger.annotations.Api;
+import com.wordnik.swagger.annotations.ApiOperation;
+
 @Path("/logging")
+@Api(value="/logging",description="logging")
 public class MsoLoggingServlet {
 
     private static final String DEBUGLOG = "asyncEELFDebug";
@@ -51,6 +55,7 @@
     @GET
     @Path("/setLevel/{logContext}/{level}")
     @Produces("text/plain")
+    @ApiOperation(value="message print",response=Response.class)
     public Response setLogLevel (@PathParam("logContext") String logContext, @PathParam("level") String level) {
         logger.info (MessageEnum.LOGGER_SETUP, "", "");
         
@@ -81,6 +86,7 @@
     @Path("/loggers")
     @Produces("text/plain")
     @SuppressWarnings("rawtypes")
+    @ApiOperation(value="message print",response=Response.class)
     public Response getLoggers () {
         StringBuilder response = new StringBuilder ();
         LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); 
@@ -99,6 +105,7 @@
     @GET
     @Path("/debug")
     @Produces("text/plain")
+    @ApiOperation(value="message print",response=Response.class)
     @SuppressWarnings("rawtypes")
     /*
      * Debug log is used as a general log to store all the logs events, including events generated by MSO code or by
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoDatabaseException.java b/common/src/main/java/org/openecomp/mso/properties/MsoDatabaseException.java
new file mode 100644
index 0000000..f38495e
--- /dev/null
+++ b/common/src/main/java/org/openecomp/mso/properties/MsoDatabaseException.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * 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.mso.properties;
+
+
+/**
+ * Exception during artifact installation.
+ */
+public class MsoDatabaseException extends RuntimeException {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -7048331652191419371L;
+
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public MsoDatabaseException (final String message) {
+        super (message);
+       
+    }
+	
+    /**
+     * @param message The message to dump
+     * @param cause The Throwable cause object
+     */
+    public MsoDatabaseException (final String message, final Throwable cause) {
+        super (message, cause);
+       
+    }
+}
diff --git a/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java b/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java
index 976b579..cfc9c7d 100644
--- a/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java
+++ b/common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java
@@ -25,12 +25,13 @@
 import java.io.IOException;
 import java.security.GeneralSecurityException;
 
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonParseException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
 import org.openecomp.mso.utils.CryptoUtils;
 
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
 
 public class MsoJsonProperties extends AbstractMsoProperties {
 	
diff --git a/common/src/main/resources/BPMN.properties b/common/src/main/resources/BPMN.properties
index 298268b..9e8a7e7 100644
--- a/common/src/main/resources/BPMN.properties
+++ b/common/src/main/resources/BPMN.properties
@@ -87,8 +87,8 @@
                   Exception encountered|\
                   Please check other logs for more information|\
                   Exception encountered        
-BPMN_SDNC_CALLBACK_EXCEPTION=\
+BPMN_CALLBACK_EXCEPTION=\
                   MSO-BPEL-9102E|\
-                  {0} Exception occurred during processing of MSO sdncAdapterCallbackService {1}|\
+                  {0} Exception occurred processing callback to BPMN process {1}|\
                   Please check other logs for more information|\
-                  Exception occurred during processing of MSO sdncAdapterCallbackService                                                                                                         
+                  Exception occurred processing callback to BPMN process
diff --git a/common/src/main/resources/Policy.properties b/common/src/main/resources/Policy.properties
new file mode 100644
index 0000000..383aa18
--- /dev/null
+++ b/common/src/main/resources/Policy.properties
@@ -0,0 +1,6 @@
+HOST = https://mtanjvsgcvm02.nvp.cip.att.com:8081/pdp/api/getDecision
+CLIENT_AUTH = Basic bTAzNzQzOnBvbGljeVIwY2sk
+AUTHORIZATION = Basic dGVzdHBkcDphbHBoYTEyMw==
+ENVIRONMENT = TEST
+X_ECOMP_REQUESTID = 1234567h
+ECOMP_COMPONENT_NAME = MSO
\ No newline at end of file
diff --git a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryTest.java b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryTest.java
index b0290b0..9a85797 100644
--- a/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryTest.java
+++ b/common/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoPropertiesFactoryTest.java
@@ -28,17 +28,17 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.codehaus.jackson.JsonNode;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
-
 import org.openecomp.mso.properties.MsoJavaProperties;
 import org.openecomp.mso.properties.MsoJsonProperties;
 import org.openecomp.mso.properties.MsoPropertiesException;
 import org.openecomp.mso.properties.MsoPropertiesFactory;
 
+import com.fasterxml.jackson.databind.JsonNode;
+
 /**
  * This class implements test methods of the MsoPropertiesFactory features.
  *
diff --git a/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTest.java b/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTest.java
deleted file mode 100644
index a4fe1d3..0000000
--- a/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:09:00 GMT 2016
- */
-
-package org.openecomp.mso.entity;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class MsoRequestESTest extends MsoRequestESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoRequest msoRequest0 = new MsoRequest();
-      msoRequest0.setServiceInstanceId("B1!G~O TIP1Auoc}pE");
-      String string0 = msoRequest0.getServiceInstanceId();
-      assertEquals("B1!G~O TIP1Auoc}pE", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test1()  throws Throwable  {
-      MsoRequest msoRequest0 = new MsoRequest();
-      msoRequest0.setServiceInstanceId("");
-      String string0 = msoRequest0.getServiceInstanceId();
-      assertEquals("", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test2()  throws Throwable  {
-      MsoRequest msoRequest0 = new MsoRequest();
-      String string0 = msoRequest0.getRequestId();
-      assertNull(string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test3()  throws Throwable  {
-      MsoRequest msoRequest0 = new MsoRequest("'SJ", "XUQ4Vd$ppTT4");
-      assertEquals("'SJ", msoRequest0.getRequestId());
-      
-      msoRequest0.setRequestId("");
-      msoRequest0.getRequestId();
-      assertEquals("XUQ4Vd$ppTT4", msoRequest0.getServiceInstanceId());
-  }
-
-  @Test(timeout = 4000)
-  public void test4()  throws Throwable  {
-      MsoRequest msoRequest0 = new MsoRequest("'SJ", "XUQ4Vd$ppTT4");
-      String string0 = msoRequest0.getRequestId();
-      assertEquals("XUQ4Vd$ppTT4", msoRequest0.getServiceInstanceId());
-      assertEquals("'SJ", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test5()  throws Throwable  {
-      MsoRequest msoRequest0 = new MsoRequest();
-      String string0 = msoRequest0.getServiceInstanceId();
-      assertNull(string0);
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTestscaffolding.java
deleted file mode 100644
index 9ac7ad8..0000000
--- a/common/src/test/java/org/openecomp/mso/entity/MsoRequestESTestscaffolding.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:09:00 GMT 2016
- */
-
-package org.openecomp.mso.entity;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MsoRequestESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.entity.MsoRequest"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoRequestESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.entity.MsoRequest"
-    );
-  } 
-
-  private static void resetClasses() {
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/logger/LogFilterESTest.java b/common/src/test/java/org/openecomp/mso/logger/LogFilterESTest.java
deleted file mode 100644
index 2293685..0000000
--- a/common/src/test/java/org/openecomp/mso/logger/LogFilterESTest.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:08:24 GMT 2016
- */
-
-package org.openecomp.mso.logger;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-import static org.evosuite.runtime.MockitoExtension.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import java.security.Principal;
-import javax.servlet.AsyncContext;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.ServletResponseWrapper;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class LogFilterESTest extends LogFilterESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      LogFilter logFilter0 = new LogFilter();
-      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      // Undeclared exception!
-      try { 
-        logFilter0.doFilter((ServletRequest) null, (ServletResponse) null, filterChain0);
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.openecomp.mso.logger.LogFilter", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test1()  throws Throwable  {
-      LogFilter logFilter0 = new LogFilter();
-      ServletRequest servletRequest0 = mock(ServletRequest.class, new ViolatedAssumptionAnswer());
-      ServletResponse servletResponse0 = mock(ServletResponse.class, new ViolatedAssumptionAnswer());
-      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      // Undeclared exception!
-      try { 
-        logFilter0.doFilter(servletRequest0, servletResponse0, filterChain0);
-        fail("Expecting exception: ClassCastException");
-      
-      } catch(ClassCastException e) {
-         //
-         // $javax.servlet.ServletRequest$$EnhancerByMockitoWithCGLIB$$d677bdba cannot be cast to javax.servlet.http.HttpServletRequest
-         //
-         verifyException("org.openecomp.mso.logger.LogFilter", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test2()  throws Throwable  {
-      LogFilter logFilter0 = new LogFilter();
-      FilterConfig filterConfig0 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
-      logFilter0.init(filterConfig0);
-      ServletRequest servletRequest0 = mock(ServletRequest.class, new ViolatedAssumptionAnswer());
-      ServletResponse servletResponse0 = mock(ServletResponse.class, new ViolatedAssumptionAnswer());
-      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      // Undeclared exception!
-      try { 
-        logFilter0.doFilter(servletRequest0, servletResponse0, filterChain0);
-        fail("Expecting exception: ClassCastException");
-      
-      } catch(ClassCastException e) {
-         //
-         // $javax.servlet.ServletRequest$$EnhancerByMockitoWithCGLIB$$d677bdba cannot be cast to javax.servlet.http.HttpServletRequest
-         //
-         verifyException("org.openecomp.mso.logger.LogFilter", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test3()  throws Throwable  {
-      LogFilter logFilter0 = new LogFilter();
-      FilterConfig filterConfig0 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
-      logFilter0.init(filterConfig0);
-      ServletRequest servletRequest0 = null;
-      ServletResponse servletResponse0 = mock(ServletResponse.class, new ViolatedAssumptionAnswer());
-      ServletResponse servletResponse1 = mock(ServletResponse.class, new ViolatedAssumptionAnswer());
-      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      // Undeclared exception!
-      try { 
-        logFilter0.doFilter((ServletRequest) null, servletResponse1, filterChain0);
-        fail("Expecting exception: ClassCastException");
-      
-      } catch(ClassCastException e) {
-         //
-         // $javax.servlet.ServletResponse$$EnhancerByMockitoWithCGLIB$$b9bd7b44 cannot be cast to javax.servlet.http.HttpServletResponse
-         //
-         verifyException("org.openecomp.mso.logger.LogFilter", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test4()  throws Throwable  {
-      LogFilter logFilter0 = new LogFilter();
-      logFilter0.destroy();
-      HttpServletRequest httpServletRequest0 = mock(HttpServletRequest.class, new ViolatedAssumptionAnswer());
-      HttpServletRequestWrapper httpServletRequestWrapper0 = new HttpServletRequestWrapper(httpServletRequest0);
-      ServletResponse servletResponse0 = null;
-      ServletResponseWrapper servletResponseWrapper0 = null;
-      try {
-        servletResponseWrapper0 = new ServletResponseWrapper((ServletResponse) null);
-        fail("Expecting exception: IllegalArgumentException");
-      
-      } catch(IllegalArgumentException e) {
-         //
-         // Response cannot be null
-         //
-         verifyException("javax.servlet.ServletResponseWrapper", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test5()  throws Throwable  {
-      LogFilter logFilter0 = new LogFilter();
-      HttpServletRequest httpServletRequest0 = mock(HttpServletRequest.class, new ViolatedAssumptionAnswer());
-      doReturn((String) null, (String) null, (String) null, (String) null, (String) null).when(httpServletRequest0).getRemoteAddr();
-      doReturn((AsyncContext) null).when(httpServletRequest0).startAsync(any(javax.servlet.ServletRequest.class) , any(javax.servlet.ServletResponse.class));
-      doReturn((Principal) null, (Principal) null, (Principal) null, (Principal) null, (Principal) null).when(httpServletRequest0).getUserPrincipal();
-      HttpServletRequestWrapper httpServletRequestWrapper0 = new HttpServletRequestWrapper(httpServletRequest0);
-      ServletRequest servletRequest0 = httpServletRequestWrapper0.getRequest();
-      HttpServletResponse httpServletResponse0 = mock(HttpServletResponse.class, new ViolatedAssumptionAnswer());
-      doReturn((String) null).when(httpServletResponse0).getCharacterEncoding();
-      HttpServletResponseWrapper httpServletResponseWrapper0 = new HttpServletResponseWrapper(httpServletResponse0);
-      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      logFilter0.doFilter(servletRequest0, httpServletResponseWrapper0, filterChain0);
-      logFilter0.destroy();
-      LogFilter logFilter1 = new LogFilter();
-      HttpServletResponseWrapper httpServletResponseWrapper1 = new HttpServletResponseWrapper((HttpServletResponse) httpServletResponseWrapper0);
-      FilterChain filterChain1 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      logFilter0.doFilter(servletRequest0, httpServletResponseWrapper0, filterChain1);
-      FilterChain filterChain2 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      logFilter1.doFilter(servletRequest0, httpServletResponseWrapper1, filterChain2);
-      HttpServletResponseWrapper httpServletResponseWrapper2 = (HttpServletResponseWrapper)httpServletResponseWrapper1.getResponse();
-      httpServletResponseWrapper1.getCharacterEncoding();
-      httpServletResponseWrapper1.flushBuffer();
-      httpServletRequestWrapper0.startAsync(servletRequest0, (ServletResponse) httpServletResponseWrapper1);
-      FilterChain filterChain3 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      logFilter1.doFilter(servletRequest0, httpServletResponseWrapper2, filterChain3);
-      FilterChain filterChain4 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      FilterChain filterChain5 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      logFilter1.doFilter(httpServletRequestWrapper0, httpServletResponseWrapper1, filterChain5);
-      logFilter1.doFilter(servletRequest0, httpServletResponseWrapper0, filterChain4);
-      logFilter0.destroy();
-      FilterConfig filterConfig0 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
-      logFilter1.init(filterConfig0);
-      LogFilter logFilter2 = new LogFilter();
-      FilterConfig filterConfig1 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
-      logFilter1.init(filterConfig1);
-      logFilter0.destroy();
-      assertFalse(logFilter0.equals((Object)logFilter1));
-  }
-
-  @Test(timeout = 4000)
-  public void test6()  throws Throwable  {
-      LogFilter logFilter0 = new LogFilter();
-      Principal principal0 = mock(Principal.class, new ViolatedAssumptionAnswer());
-      doReturn((String) null).when(principal0).getName();
-      HttpServletRequest httpServletRequest0 = mock(HttpServletRequest.class, new ViolatedAssumptionAnswer());
-      doReturn("$PJ-hW?").when(httpServletRequest0).getRemoteAddr();
-      doReturn(principal0).when(httpServletRequest0).getUserPrincipal();
-      HttpServletRequestWrapper httpServletRequestWrapper0 = new HttpServletRequestWrapper(httpServletRequest0);
-      ServletRequest servletRequest0 = httpServletRequestWrapper0.getRequest();
-      HttpServletResponse httpServletResponse0 = mock(HttpServletResponse.class, new ViolatedAssumptionAnswer());
-      HttpServletResponseWrapper httpServletResponseWrapper0 = new HttpServletResponseWrapper(httpServletResponse0);
-      ServletResponse servletResponse0 = httpServletResponseWrapper0.getResponse();
-      FilterChain filterChain0 = mock(FilterChain.class, new ViolatedAssumptionAnswer());
-      logFilter0.doFilter(servletRequest0, servletResponse0, filterChain0);
-      FilterConfig filterConfig0 = mock(FilterConfig.class, new ViolatedAssumptionAnswer());
-      logFilter0.init(filterConfig0);
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/logger/LogFilterESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/logger/LogFilterESTestscaffolding.java
deleted file mode 100644
index 5048763..0000000
--- a/common/src/test/java/org/openecomp/mso/logger/LogFilterESTestscaffolding.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:08:24 GMT 2016
- */
-
-package org.openecomp.mso.logger;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class LogFilterESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.logger.LogFilter"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(LogFilterESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.logger.LogFilter"
-    );
-  } 
-
-  private static void resetClasses() {
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoAlarmLoggerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/logger/MsoAlarmLoggerESTestscaffolding.java
deleted file mode 100644
index 320b755..0000000
--- a/common/src/test/java/org/openecomp/mso/logger/MsoAlarmLoggerESTestscaffolding.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:05:53 GMT 2016
- */
-
-package org.openecomp.mso.logger;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-@EvoSuiteClassExclude
-public class MsoAlarmLoggerESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  protected static ExecutorService executor; 
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.logger.MsoAlarmLogger"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    executor = Executors.newCachedThreadPool(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    executor.shutdownNow(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoAlarmLoggerESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.logger.MsoAlarmLogger"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoAlarmLoggerESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "org.openecomp.mso.logger.MsoAlarmLogger"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTest.java b/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTest.java
deleted file mode 100644
index 97058d5..0000000
--- a/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:06:06 GMT 2016
- */
-
-package org.openecomp.mso.logger;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class MsoLogInitializerESTest extends MsoLogInitializerESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoLogInitializer msoLogInitializer0 = new MsoLogInitializer();
-      ServletContextEvent servletContextEvent0 = mock(ServletContextEvent.class, new ViolatedAssumptionAnswer());
-      doReturn((ServletContext) null).when(servletContextEvent0).getServletContext();
-      msoLogInitializer0.contextInitialized(servletContextEvent0);
-  }
-
-  @Test(timeout = 4000)
-  public void test1()  throws Throwable  {
-      MsoLogInitializer msoLogInitializer0 = new MsoLogInitializer();
-      Boolean boolean0 = (Boolean)PrivateAccess.callMethod((Class<MsoLogInitializer>) MsoLogInitializer.class, msoLogInitializer0, "fileIsReadable", (Object) "", (Class<?>) String.class);
-      assertTrue(boolean0);
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTestscaffolding.java
deleted file mode 100644
index c013954..0000000
--- a/common/src/test/java/org/openecomp/mso/logger/MsoLogInitializerESTestscaffolding.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:06:06 GMT 2016
- */
-
-package org.openecomp.mso.logger;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MsoLogInitializerESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.logger.MsoLogInitializer"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoLogInitializerESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.logger.MsoLogger",
-      "org.openecomp.mso.logger.MessageEnum",
-      "com.att.eelf.i18n.EELFResolvableErrorEnum",
-      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
-      "org.openecomp.mso.entity.MsoRequest",
-      "org.openecomp.mso.logger.MsoLogger$StatusCode",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "com.att.eelf.configuration.EELFManager",
-      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
-      "com.att.eelf.configuration.EELFLogger",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "com.att.eelf.configuration.SLF4jWrapper",
-      "org.openecomp.mso.logger.MsoLogInitializer",
-      "com.att.eelf.i18n.EELFResourceManager"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoLogInitializerESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "com.att.eelf.i18n.EELFResourceManager",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.openecomp.mso.logger.MsoLogInitializer",
-      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
-      "org.openecomp.mso.logger.MsoLogger",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
-      "org.apache.xerces.jaxp.SAXParserImpl",
-      "org.apache.xerces.parsers.XMLParser",
-      "org.apache.xerces.parsers.AbstractSAXParser",
-      "org.apache.xerces.parsers.SAXParser",
-      "org.apache.xerces.parsers.ObjectFactory",
-      "org.apache.xerces.util.ParserConfigurationSettings",
-      "org.apache.xerces.parsers.XML11Configuration",
-      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
-      "org.apache.xerces.util.SymbolTable",
-      "org.apache.xerces.impl.XMLEntityManager",
-      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
-      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
-      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
-      "org.apache.xerces.impl.XMLEntityScanner$1",
-      "org.apache.xerces.impl.XMLEntityScanner",
-      "org.apache.xerces.impl.XMLErrorReporter",
-      "org.apache.xerces.impl.XMLScanner",
-      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
-      "org.apache.xerces.impl.XMLDocumentScannerImpl",
-      "org.apache.xerces.util.XMLStringBuffer",
-      "org.apache.xerces.util.XMLAttributesImpl",
-      "org.apache.xerces.impl.XMLDTDScannerImpl",
-      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
-      "org.apache.xerces.impl.dtd.XMLDTDValidator",
-      "org.apache.xerces.impl.validation.ValidationState",
-      "org.apache.xerces.impl.dtd.XMLElementDecl",
-      "org.apache.xerces.impl.dtd.XMLSimpleType",
-      "org.apache.xerces.impl.dv.DTDDVFactory",
-      "org.apache.xerces.impl.dv.ObjectFactory",
-      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
-      "org.apache.xerces.impl.XMLVersionDetector",
-      "org.apache.xerces.impl.msg.XMLMessageFormatter",
-      "org.apache.xerces.impl.io.UTF8Reader",
-      "org.apache.xerces.util.XMLSymbols",
-      "org.apache.xerces.xni.NamespaceContext",
-      "org.apache.xerces.util.XMLChar",
-      "org.apache.xerces.impl.Constants",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "com.att.eelf.configuration.EELFManager"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTest.java b/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTest.java
deleted file mode 100644
index 2761f64..0000000
--- a/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:04:06 GMT 2016
- */
-
-package org.openecomp.mso.logger;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class MsoLoggingServletESTest extends MsoLoggingServletESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoLoggingServlet msoLoggingServlet0 = new MsoLoggingServlet();
-      try { 
-        PrivateAccess.callMethod((Class<MsoLoggingServlet>) MsoLoggingServlet.class, msoLoggingServlet0, "isMsoLogger", (Object) null, (Class<?>) String.class);
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.openecomp.mso.logger.MsoLoggingServlet", e);
-      }
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTestscaffolding.java
deleted file mode 100644
index be6c378..0000000
--- a/common/src/test/java/org/openecomp/mso/logger/MsoLoggingServletESTestscaffolding.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:04:06 GMT 2016
- */
-
-package org.openecomp.mso.logger;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MsoLoggingServletESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.logger.MsoLoggingServlet"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoLoggingServletESTestscaffolding.class.getClassLoader() ,
-      "org.jboss.resteasy.spi.StringConverter",
-      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
-      "org.apache.xerces.xni.XMLResourceIdentifier",
-      "org.apache.xerces.impl.XMLEntityManager",
-      "org.apache.xerces.impl.dtd.XMLDTDDescription",
-      "com.att.eelf.i18n.EELFMsgs",
-      "org.jboss.resteasy.util.ThreadLocalStack",
-      "org.apache.xerces.impl.dv.InvalidDatatypeValueException",
-      "org.apache.xerces.jaxp.UnparsedEntityHandler",
-      "org.apache.xerces.parsers.AbstractXMLDocumentParser",
-      "org.apache.xerces.impl.XMLScanner",
-      "org.apache.xerces.impl.dv.dtd.NOTATIONDatatypeValidator",
-      "org.apache.xerces.xni.parser.XMLParseException",
-      "org.apache.xerces.impl.XMLEntityScanner",
-      "org.apache.xerces.util.URI$MalformedURIException",
-      "org.apache.xerces.impl.XMLNSDocumentScannerImpl",
-      "org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry",
-      "org.apache.xerces.impl.dtd.models.CMAny",
-      "org.apache.xerces.util.URI",
-      "org.apache.xerces.xni.parser.XMLDocumentFilter",
-      "org.apache.xerces.xni.parser.XMLDTDSource",
-      "org.apache.xerces.impl.dtd.XMLAttributeDecl",
-      "org.apache.xerces.parsers.XMLParser",
-      "org.jboss.resteasy.spi.ResteasyProviderFactory",
-      "org.apache.xerces.util.SymbolTable",
-      "org.apache.xerces.impl.io.Latin1Reader",
-      "org.apache.xerces.impl.dv.ValidationContext",
-      "org.jboss.resteasy.spi.BadRequestException",
-      "org.apache.xerces.impl.dtd.XMLDTDValidator",
-      "org.apache.xerces.impl.dtd.XML11NSDTDValidator",
-      "org.openecomp.mso.logger.MsoLoggingServlet",
-      "org.apache.xerces.util.AugmentationsImpl",
-      "org.jboss.resteasy.core.interception.ReaderInterceptorRegistry",
-      "org.apache.xerces.impl.dv.ObjectFactory",
-      "org.jboss.resteasy.client.exception.mapper.ClientExceptionMapper",
-      "org.apache.xerces.impl.dv.DatatypeValidator",
-      "org.jboss.resteasy.spi.InjectorFactory",
-      "org.jboss.resteasy.core.interception.LegacyPrecedence",
-      "org.apache.xerces.jaxp.SAXParserImpl",
-      "org.apache.xerces.xni.grammars.XMLGrammarDescription",
-      "org.jboss.resteasy.plugins.delegates.NewCookieHeaderDelegate",
-      "org.apache.xerces.xni.parser.XMLErrorHandler",
-      "org.apache.xerces.util.MessageFormatter",
-      "org.apache.xerces.impl.XMLEntityManager$1",
-      "org.apache.xerces.xni.parser.XMLDTDScanner",
-      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
-      "org.apache.xerces.xni.XMLAttributes",
-      "org.apache.xerces.impl.dv.dtd.StringDatatypeValidator",
-      "org.apache.xerces.impl.io.MalformedByteSequenceException",
-      "org.apache.xerces.impl.Constants$ArrayEnumeration",
-      "org.jboss.resteasy.core.interception.WriterInterceptorRegistry",
-      "org.apache.xerces.impl.dv.DTDDVFactory",
-      "org.apache.xerces.impl.dv.dtd.IDDatatypeValidator",
-      "org.apache.xerces.impl.validation.ValidationManager",
-      "org.apache.xerces.xni.XNIException",
-      "org.apache.xerces.impl.dtd.models.CMNode",
-      "org.apache.xerces.xni.parser.XMLDocumentSource",
-      "org.apache.xerces.xni.XMLDTDContentModelHandler",
-      "org.jboss.resteasy.spi.StringParameterUnmarshaller",
-      "org.jboss.resteasy.core.MediaTypeMap",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
-      "org.apache.xerces.impl.XMLErrorReporter",
-      "org.jboss.resteasy.specimpl.ResteasyUriBuilder",
-      "org.apache.xerces.impl.Constants",
-      "org.apache.xerces.util.XMLStringBuffer",
-      "org.apache.xerces.jaxp.JAXPConstants",
-      "org.apache.xerces.xni.parser.XMLParserConfiguration",
-      "org.apache.xerces.xni.XMLString",
-      "org.apache.xerces.impl.dv.DVFactoryException",
-      "org.apache.xerces.impl.dv.DatatypeException",
-      "org.apache.xerces.parsers.XML11Configurable",
-      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
-      "org.jboss.resteasy.logging.Logger$LoggerType",
-      "org.apache.xerces.impl.xs.identity.FieldActivator",
-      "org.apache.xerces.impl.XMLEntityScanner$1",
-      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
-      "org.jboss.resteasy.util.CaseInsensitiveMap$CaseInsensitiveComparator",
-      "org.apache.xerces.xs.ElementPSVI",
-      "org.apache.xerces.parsers.AbstractSAXParser",
-      "org.jboss.resteasy.spi.LoggableFailure",
-      "org.apache.xerces.xni.parser.XMLDTDFilter",
-      "org.apache.xerces.xni.parser.XMLDTDContentModelSource",
-      "org.openecomp.mso.entity.MsoRequest",
-      "org.apache.xerces.xni.XMLLocator",
-      "org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser",
-      "org.apache.xerces.xni.Augmentations",
-      "org.apache.xerces.impl.XMLEntityHandler",
-      "org.jboss.resteasy.util.CaseInsensitiveMap$1",
-      "org.jboss.resteasy.specimpl.BuiltResponse",
-      "org.jboss.resteasy.core.Headers",
-      "org.apache.xerces.xni.parser.XMLComponent",
-      "org.apache.xerces.impl.dv.dtd.ListDatatypeValidator",
-      "org.jboss.resteasy.spi.Failure",
-      "org.apache.xerces.impl.XMLEntityManager$ScannedEntity",
-      "org.apache.xerces.jaxp.JAXPValidatorComponent",
-      "org.apache.xerces.xni.parser.XMLDTDContentModelFilter",
-      "org.apache.xerces.xs.PSVIProvider",
-      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
-      "org.jboss.resteasy.specimpl.ResponseBuilderImpl",
-      "org.jboss.resteasy.core.interception.ClientResponseFilterRegistry",
-      "org.apache.xerces.impl.dtd.XMLEntityDecl",
-      "org.apache.xerces.xs.ItemPSVI",
-      "org.jboss.resteasy.specimpl.MultivaluedTreeMap",
-      "org.apache.xerces.impl.dv.dtd.ENTITYDatatypeValidator",
-      "org.apache.xerces.xni.parser.XMLEntityResolver",
-      "org.jboss.resteasy.client.core.ClientErrorInterceptor",
-      "org.apache.xerces.impl.dtd.XMLNSDTDValidator",
-      "org.apache.xerces.impl.XMLDTDScannerImpl",
-      "org.apache.xerces.impl.dv.dtd.NMTOKENDatatypeValidator",
-      "org.apache.xerces.parsers.ObjectFactory",
-      "org.jboss.resteasy.spi.ResteasyProviderFactory$SortedKey",
-      "org.apache.xerces.xni.parser.XMLConfigurationException",
-      "org.apache.xerces.impl.XML11NSDocumentScannerImpl",
-      "org.apache.xerces.parsers.SAXParser",
-      "com.att.eelf.i18n.EELFResolvableErrorEnum",
-      "org.apache.xerces.impl.XMLEntityManager$RewindableInputStream",
-      "org.jboss.resteasy.core.interception.ContainerRequestFilterRegistry",
-      "org.jboss.resteasy.specimpl.VariantListBuilderImpl",
-      "org.apache.xerces.xni.parser.XMLInputSource",
-      "org.apache.xerces.xni.parser.XMLComponentManager",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "org.jboss.resteasy.core.interception.JaxrsInterceptorRegistry$InterceptorFactory",
-      "org.apache.xerces.impl.io.UTF8Reader",
-      "org.apache.xerces.impl.dtd.XMLSimpleType",
-      "org.apache.xerces.impl.XML11DocumentScannerImpl",
-      "org.apache.xerces.util.AugmentationsImpl$AugmentationsItemsContainer",
-      "org.apache.xerces.util.XMLChar",
-      "org.apache.xerces.impl.XML11DTDScannerImpl",
-      "org.apache.xerces.impl.dtd.XMLElementDecl",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "org.apache.xerces.xni.grammars.Grammar",
-      "org.apache.xerces.impl.dtd.models.ContentModelValidator",
-      "com.att.eelf.configuration.EELFLogger",
-      "org.apache.xerces.xni.grammars.XMLGrammarLoader",
-      "org.apache.xerces.xni.XMLDocumentHandler",
-      "org.apache.xerces.impl.io.UCSReader",
-      "org.apache.xerces.impl.XMLEntityManager$CharacterBuffer",
-      "org.apache.xerces.impl.validation.ValidationState",
-      "org.apache.xerces.impl.XMLEntityManager$Entity",
-      "org.jboss.resteasy.spi.HttpRequest",
-      "org.apache.xerces.util.XMLResourceIdentifierImpl",
-      "org.jboss.resteasy.logging.Logger",
-      "org.jboss.resteasy.spi.ConstructorInjector",
-      "org.apache.xerces.xni.NamespaceContext",
-      "org.apache.xerces.impl.dtd.XMLDTDLoader",
-      "org.jboss.resteasy.util.CaseInsensitiveMap",
-      "org.apache.xerces.util.XMLSymbols",
-      "org.apache.xerces.parsers.ObjectFactory$ConfigurationError",
-      "org.jboss.resteasy.core.interception.ContainerResponseFilterRegistry",
-      "org.apache.xerces.impl.io.ASCIIReader",
-      "org.jboss.resteasy.core.interception.InterceptorRegistry",
-      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
-      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
-      "org.apache.xerces.impl.XML11EntityScanner",
-      "org.apache.xerces.impl.dtd.DTDGrammar",
-      "org.apache.xerces.impl.dv.dtd.IDREFDatatypeValidator",
-      "com.att.eelf.configuration.SLF4jWrapper",
-      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
-      "org.apache.xerces.impl.dtd.XMLContentSpec",
-      "org.openecomp.mso.logger.MsoLogger",
-      "org.apache.xerces.xs.AttributePSVI",
-      "org.apache.xerces.impl.dtd.DTDGrammarBucket",
-      "org.apache.xerces.impl.msg.XMLMessageFormatter",
-      "org.apache.xerces.xni.parser.XMLDocumentScanner",
-      "org.apache.xerces.impl.XMLVersionDetector",
-      "org.apache.xerces.impl.XMLDocumentScannerImpl",
-      "org.apache.xerces.xni.parser.XMLPullParserConfiguration",
-      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Dispatcher",
-      "org.apache.xerces.impl.xs.XMLSchemaValidator",
-      "org.apache.xerces.xni.grammars.XMLDTDDescription",
-      "org.jboss.resteasy.logging.impl.Slf4jLogger",
-      "org.apache.xerces.xni.QName",
-      "org.apache.xerces.jaxp.TeeXMLDocumentFilterImpl",
-      "org.apache.xerces.util.XMLAttributesImpl",
-      "org.apache.xerces.impl.XMLEntityManager$InternalEntity",
-      "org.apache.xerces.impl.RevalidationHandler",
-      "org.jboss.resteasy.spi.HeaderValueProcessor",
-      "org.apache.xerces.util.AugmentationsImpl$LargeContainer",
-      "org.apache.xerces.impl.dtd.BalancedDTDGrammar",
-      "org.apache.xerces.xni.XMLDTDHandler",
-      "org.apache.xerces.impl.dtd.XML11DTDProcessor",
-      "org.apache.xerces.parsers.XML11Configuration",
-      "org.apache.xerces.impl.dtd.XMLDTDValidatorFilter",
-      "com.att.eelf.i18n.EELFResourceManager",
-      "org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate",
-      "org.jboss.resteasy.core.MediaTypeMap$Typed",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
-      "org.openecomp.mso.logger.MsoLogger$StatusCode",
-      "com.att.eelf.configuration.EELFManager",
-      "org.jboss.resteasy.spi.HttpResponse",
-      "org.apache.xerces.impl.validation.EntityState",
-      "org.apache.xerces.impl.XMLEntityManager$ExternalEntity",
-      "org.apache.xerces.util.ParserConfigurationSettings",
-      "org.apache.xerces.impl.dv.ObjectFactory$ConfigurationError",
-      "com.att.eelf.i18n.EELFResourceManager$1",
-      "org.apache.xerces.impl.dtd.XML11DTDValidator"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoLoggingServletESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "com.att.eelf.i18n.EELFResourceManager",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.openecomp.mso.logger.MsoLogger",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
-      "org.apache.xerces.jaxp.SAXParserImpl",
-      "org.apache.xerces.parsers.XMLParser",
-      "org.apache.xerces.parsers.AbstractSAXParser",
-      "org.apache.xerces.parsers.SAXParser",
-      "org.apache.xerces.parsers.ObjectFactory",
-      "org.apache.xerces.util.ParserConfigurationSettings",
-      "org.apache.xerces.parsers.XML11Configuration",
-      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
-      "org.apache.xerces.util.SymbolTable",
-      "org.apache.xerces.impl.XMLEntityManager",
-      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
-      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
-      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
-      "org.apache.xerces.impl.XMLEntityScanner$1",
-      "org.apache.xerces.impl.XMLEntityScanner",
-      "org.apache.xerces.impl.XMLErrorReporter",
-      "org.apache.xerces.impl.XMLScanner",
-      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
-      "org.apache.xerces.impl.XMLDocumentScannerImpl",
-      "org.apache.xerces.util.XMLStringBuffer",
-      "org.apache.xerces.util.XMLAttributesImpl",
-      "org.apache.xerces.impl.XMLDTDScannerImpl",
-      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
-      "org.apache.xerces.impl.dtd.XMLDTDValidator",
-      "org.apache.xerces.impl.validation.ValidationState",
-      "org.apache.xerces.impl.dtd.XMLElementDecl",
-      "org.apache.xerces.impl.dtd.XMLSimpleType",
-      "org.apache.xerces.impl.dv.DTDDVFactory",
-      "org.apache.xerces.impl.dv.ObjectFactory",
-      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
-      "org.apache.xerces.impl.XMLVersionDetector",
-      "org.apache.xerces.impl.msg.XMLMessageFormatter",
-      "org.apache.xerces.impl.io.UTF8Reader",
-      "org.apache.xerces.util.XMLSymbols",
-      "org.apache.xerces.xni.NamespaceContext",
-      "org.apache.xerces.util.XMLChar",
-      "org.apache.xerces.impl.Constants",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "com.att.eelf.configuration.EELFManager",
-      "org.jboss.resteasy.logging.Logger$LoggerType",
-      "org.jboss.resteasy.logging.Logger",
-      "org.jboss.resteasy.spi.ResteasyProviderFactory",
-      "org.jboss.resteasy.core.MediaTypeMap",
-      "org.jboss.resteasy.core.interception.LegacyPrecedence",
-      "org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate",
-      "org.jboss.resteasy.plugins.delegates.NewCookieHeaderDelegate",
-      "org.jboss.resteasy.specimpl.MultivaluedTreeMap",
-      "org.jboss.resteasy.util.CaseInsensitiveMap$CaseInsensitiveComparator",
-      "org.jboss.resteasy.util.CaseInsensitiveMap",
-      "org.jboss.resteasy.core.Headers",
-      "org.openecomp.mso.logger.MsoLoggingServlet"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTest.java b/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTest.java
deleted file mode 100644
index 535d929..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTest.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:09:20 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import static org.evosuite.runtime.EvoAssertions.verifyException;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.FileNotFoundException;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class AbstractMsoPropertiesESTest extends AbstractMsoPropertiesESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test00()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      String string0 = msoJavaProperties0.toString();
-      assertEquals("Config file null(Timer:0mins):\n\n\n", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test01()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
-      msoJavaProperties1.propertiesFileName = "+";
-      msoJavaProperties1.getPropertiesFileName();
-      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
-  }
-
-  @Test(timeout = 4000)
-  public void test02()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
-      msoJavaProperties1.propertiesFileName = "";
-      msoJavaProperties1.getPropertiesFileName();
-      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
-  }
-
-  @Test(timeout = 4000)
-  public void test03()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.automaticRefreshInMinutes = (-1447);
-      int int0 = msoJavaProperties0.getAutomaticRefreshInMinutes();
-      assertEquals((-1447), int0);
-  }
-
-  @Test(timeout = 4000)
-  public void test04()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.equals(msoJavaProperties0);
-      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
-  }
-
-  @Test(timeout = 4000)
-  public void test05()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.equals("X<0P%qxWR  fu\"");
-      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
-  }
-
-  @Test(timeout = 4000)
-  public void test06()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      MsoJavaProperties msoJavaProperties1 = (MsoJavaProperties)msoJavaProperties0.clone();
-      assertEquals(0, msoJavaProperties1.getAutomaticRefreshInMinutes());
-  }
-
-  @Test(timeout = 4000)
-  public void test07()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.automaticRefreshInMinutes = (-1447);
-      MsoJavaProperties msoJavaProperties1 = (MsoJavaProperties)msoJavaProperties0.clone();
-      assertTrue(msoJavaProperties1.equals((Object)msoJavaProperties0));
-  }
-
-  /**
-   * TODO: fails when run using maven, but succeeds when run using eclipse   
-   * @throws Throwable
-   */
-  @Ignore
-  @Test(timeout = 4000)
-  public void test08()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.reloadPropertiesFile();
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test09()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.propertiesFileName = "ASDC_ARTIFACT_ALREADY_DEPLOYED";
-      try { 
-        msoJavaProperties0.reloadPropertiesFile();
-        fail("Expecting exception: FileNotFoundException");
-      
-      } catch(FileNotFoundException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test10()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      try { 
-        msoJavaProperties0.loadPropertiesFile("Trying to reset value handler for type [");
-        fail("Expecting exception: FileNotFoundException");
-      
-      } catch(FileNotFoundException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test11()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.getPropertiesFileName();
-      assertEquals(0, msoJavaProperties0.getAutomaticRefreshInMinutes());
-  }
-
-  @Test(timeout = 4000)
-  public void test12()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      int int0 = msoJavaProperties0.getAutomaticRefreshInMinutes();
-      assertEquals(0, int0);
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTestscaffolding.java
deleted file mode 100644
index 4224f01..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/AbstractMsoPropertiesESTestscaffolding.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:09:20 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class AbstractMsoPropertiesESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.AbstractMsoProperties"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(AbstractMsoPropertiesESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.properties.AbstractMsoProperties",
-      "org.openecomp.mso.logger.MsoLogger",
-      "org.openecomp.mso.logger.MessageEnum",
-      "com.att.eelf.i18n.EELFResolvableErrorEnum",
-      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
-      "org.openecomp.mso.entity.MsoRequest",
-      "org.openecomp.mso.logger.MsoLogger$StatusCode",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "com.att.eelf.configuration.EELFManager",
-      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
-      "com.att.eelf.configuration.EELFLogger",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "org.openecomp.mso.properties.MsoJavaProperties",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "com.att.eelf.configuration.SLF4jWrapper",
-      "com.att.eelf.i18n.EELFResourceManager"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(AbstractMsoPropertiesESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.codehaus.jackson.map.introspect.AnnotatedClass",
-      "org.codehaus.jackson.map.introspect.BasicClassIntrospector",
-      "org.codehaus.jackson.annotate.JsonAutoDetect$Visibility",
-      "org.codehaus.jackson.annotate.JsonMethod",
-      "org.codehaus.jackson.map.introspect.VisibilityChecker$Std",
-      "org.codehaus.jackson.map.ObjectMapper",
-      "org.codehaus.jackson.JsonParser$Feature",
-      "org.codehaus.jackson.JsonGenerator$Feature",
-      "org.codehaus.jackson.JsonFactory",
-      "org.codehaus.jackson.sym.CharsToNameCanonicalizer",
-      "org.codehaus.jackson.sym.BytesToNameCanonicalizer",
-      "org.codehaus.jackson.map.type.TypeFactory",
-      "org.openecomp.mso.utils.CryptoUtils",
-      "org.openecomp.mso.logger.MsoLogger",
-      "com.att.eelf.i18n.EELFResourceManager",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "com.att.eelf.configuration.EELFManager",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.properties.AbstractMsoProperties"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTest.java
deleted file mode 100644
index d64f63f..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTest.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Thu Nov 10 08:35:35 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import static org.evosuite.runtime.EvoAssertions.verifyException;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.FileNotFoundException;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.testdata.FileSystemHandling;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import org.openecomp.mso.logger.MsoLogger;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class MsoJavaPropertiesESTest extends MsoJavaPropertiesESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test00()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.setProperty("", "J6");
-      msoJavaProperties0.hashCode();
-  }
-
-  @Test(timeout = 4000)
-  public void test02()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      String string0 = msoJavaProperties0.getProperty("IK#uRP]", (String) null);
-      assertNull(string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test03()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      String string0 = msoJavaProperties0.getProperty("", "");
-      assertNotNull(string0);
-      assertEquals("", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test04()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      int int0 = msoJavaProperties0.getIntProperty("RA_VNF_NOT_EXIST", (-1417));
-      assertEquals((-1417), int0);
-  }
-
-  @Test(timeout = 4000)
-  public void test05()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      String string0 = msoJavaProperties0.getEncryptedProperty("", "", "");
-      assertEquals("", string0);
-      assertNotNull(string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test06()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.automaticRefreshInMinutes = 1821;
-      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
-      assertNotSame(msoJavaProperties1, msoJavaProperties0);
-      assertEquals(1821, msoJavaProperties1.getAutomaticRefreshInMinutes());
-  }
-
-  @Test(timeout = 4000)
-  public void test07()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.automaticRefreshInMinutes = (-78);
-      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
-      assertNotSame(msoJavaProperties1, msoJavaProperties0);
-      assertEquals(-78, msoJavaProperties1.getAutomaticRefreshInMinutes());
-  }
-
-  @Test(timeout = 4000)
-  public void test08()  throws Throwable  {
-      FileSystemHandling fileSystemHandling0 = new FileSystemHandling();
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      PrivateAccess.setVariable((Class<MsoJavaProperties>) MsoJavaProperties.class, msoJavaProperties0, "msoProperties", (Object) null);
-      msoJavaProperties0.hashCode();
-      msoJavaProperties0.hashCode();
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.size();
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.openecomp.mso.properties.MsoJavaProperties", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test09()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.setProperty((String) null, "+UaYo-~&{QxdaN(c");
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test11()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
-      msoJavaProperties1.propertiesFileName = "";
-      try { 
-        msoJavaProperties1.reloadPropertiesFile();
-        fail("Expecting exception: FileNotFoundException");
-      
-      } catch(FileNotFoundException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
-      }
-  }
-
-  /**
-   * TODO: fails when run using maven, but succeeds when run using eclipse
-   */
-  @Ignore
-  @Test(timeout = 4000)
-  public void test12()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.loadPropertiesFile((String) null);
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test13()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      try { 
-        msoJavaProperties0.loadPropertiesFile("");
-        fail("Expecting exception: FileNotFoundException");
-      
-      } catch(FileNotFoundException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test14()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.getIntProperty((String) null, 0);
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test15()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.setProperty("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION", "");
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.getEncryptedProperty("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION", "", "k$&Fq}");
-        fail("Expecting exception: NumberFormatException");
-      
-      } catch(NumberFormatException e) {
-         //
-         // For input string: \"k$\"
-         //
-         verifyException("java.lang.NumberFormatException", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test16()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
-      msoJavaProperties1.clone();
-      msoJavaProperties0.hashCode();
-      MsoJavaProperties msoJavaProperties2 = msoJavaProperties1.clone();
-      PrivateAccess.setVariable((Class<MsoJavaProperties>) MsoJavaProperties.class, msoJavaProperties0, "msoProperties", (Object) null);
-      msoJavaProperties1.equals(msoJavaProperties2);
-      MsoLogger msoLogger0 = AbstractMsoProperties.LOGGER;
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.clone();
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("java.util.Hashtable", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test18()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      int int0 = msoJavaProperties0.getIntProperty("", 0);
-      assertEquals(0, int0);
-  }
-
-  @Test(timeout = 4000)
-  public void test19()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.setProperty("-6;qct1", "");
-      String string0 = msoJavaProperties0.toString();
-      assertEquals("Config file null(Timer:0mins):\n-6;qct1=\n\n\n", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test20()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      boolean boolean0 = msoJavaProperties0.equals("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION");
-      assertFalse(boolean0);
-  }
-
-  @Test(timeout = 4000)
-  public void test21()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      boolean boolean0 = msoJavaProperties0.equals((Object) null);
-      assertFalse(boolean0);
-  }
-
-  @Test(timeout = 4000)
-  public void test22()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      boolean boolean0 = msoJavaProperties0.equals(msoJavaProperties0);
-      assertTrue(boolean0);
-  }
-
-  @Test(timeout = 4000)
-  public void test24()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.setProperty("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION", "");
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.getEncryptedProperty("APIH_READ_VNFOUTPUT_CLOB_EXCEPTION", ".", "");
-        fail("Expecting exception: IllegalArgumentException");
-      
-      } catch(IllegalArgumentException e) {
-         //
-         // Empty key
-         //
-         verifyException("javax.crypto.spec.SecretKeySpec", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test25()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      String string0 = msoJavaProperties0.getEncryptedProperty("YhmJSc|~L0$,?/oh", (String) null, "YhmJSc|~L0$,?/oh");
-      assertNull(string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test26()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.setProperty("M;WrYY%E,;sa&4F", "M;WrYY%E,;sa&4F");
-      boolean boolean0 = msoJavaProperties0.getBooleanProperty("M;WrYY%E,;sa&4F", false);
-      assertFalse(boolean0);
-  }
-
-  @Test(timeout = 4000)
-  public void test27()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      boolean boolean0 = msoJavaProperties0.getBooleanProperty("", true);
-      assertTrue(boolean0);
-  }
-
-  @Test(timeout = 4000)
-  public void test28()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.setProperty("M;WrYY%E,;sa&4F", "M;WrYY%E,;sa&4F");
-      int int0 = msoJavaProperties0.getIntProperty("M;WrYY%E,;sa&4F", 0);
-      assertEquals(0, int0);
-  }
-
-  @Test(timeout = 4000)
-  public void test29()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      msoJavaProperties0.setProperty("", "J6");
-      String string0 = msoJavaProperties0.getProperty("", "mso.properties.reload.time.minutes");
-      assertNotNull(string0);
-      assertEquals("J6", string0);
-  }
-  /**
-   * TODO: fails when run using maven, but succeeds when run using eclipse
-   */
-  @Ignore
-  @Test(timeout = 4000)
-  public void test30()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      // Undeclared exception!
-      try { 
-        msoJavaProperties0.reloadPropertiesFile();
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test31()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      MsoJavaProperties msoJavaProperties1 = msoJavaProperties0.clone();
-      assertTrue(msoJavaProperties1.equals((Object)msoJavaProperties0));
-      
-      msoJavaProperties0.setProperty("", "");
-      boolean boolean0 = msoJavaProperties0.equals(msoJavaProperties1);
-      assertFalse(boolean0);
-      assertFalse(msoJavaProperties1.equals((Object)msoJavaProperties0));
-  }
-
-  @Test(timeout = 4000)
-  public void test32()  throws Throwable  {
-      MsoJavaProperties msoJavaProperties0 = new MsoJavaProperties();
-      int int0 = msoJavaProperties0.size();
-      assertEquals(0, int0);
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTestscaffolding.java
deleted file mode 100644
index da13dc1..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoJavaPropertiesESTestscaffolding.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 07:59:01 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MsoJavaPropertiesESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoJavaProperties"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoJavaPropertiesESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.properties.AbstractMsoProperties",
-      "org.openecomp.mso.logger.MsoLogger",
-      "org.openecomp.mso.logger.MessageEnum",
-      "com.att.eelf.i18n.EELFResolvableErrorEnum",
-      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
-      "org.openecomp.mso.utils.CryptoUtils",
-      "org.openecomp.mso.entity.MsoRequest",
-      "org.openecomp.mso.logger.MsoLogger$StatusCode",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "com.att.eelf.configuration.EELFManager",
-      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
-      "com.att.eelf.configuration.EELFLogger",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "org.openecomp.mso.properties.MsoJavaProperties",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "com.att.eelf.configuration.SLF4jWrapper",
-      "com.att.eelf.i18n.EELFResourceManager$1",
-      "com.att.eelf.i18n.EELFResourceManager"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoJavaPropertiesESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.openecomp.mso.logger.MsoLogger",
-      "com.att.eelf.i18n.EELFResourceManager",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "com.att.eelf.configuration.EELFManager",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.properties.AbstractMsoProperties",
-      "org.openecomp.mso.utils.CryptoUtils"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoJsonPropertiesESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoJsonPropertiesESTest.java
deleted file mode 100644
index 0243c13..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoJsonPropertiesESTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:04:39 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import static org.evosuite.runtime.EvoAssertions.verifyException;
-import static org.junit.Assert.fail;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class MsoJsonPropertiesESTest {
-
-  @Ignore
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoJsonProperties msoJsonProperties0 = null;
-      try {
-        msoJsonProperties0 = new MsoJsonProperties();
-        fail("Expecting exception: VerifyError");
-
-      } catch(VerifyError e) {
-         //
-         // (class: org/codehaus/jackson/map/MapperConfig, method: <clinit> signature: ()V) Bad type in putfield/putstatic
-         //
-         verifyException("org.codehaus.jackson.map.ObjectMapper", e);
-      }
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTest.java
deleted file mode 100644
index c53dd85..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:10:06 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class MsoPropertiesExceptionESTest extends MsoPropertiesExceptionESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoPropertiesException msoPropertiesException0 = new MsoPropertiesException("");
-      MsoPropertiesException msoPropertiesException1 = new MsoPropertiesException("l6G(", (Throwable) msoPropertiesException0);
-      assertFalse(msoPropertiesException1.equals((Object)msoPropertiesException0));
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTestscaffolding.java
deleted file mode 100644
index 3799563..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesExceptionESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:10:06 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MsoPropertiesExceptionESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoPropertiesException"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoPropertiesExceptionESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.properties.MsoPropertiesException"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoPropertiesExceptionESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "org.openecomp.mso.properties.MsoPropertiesException"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesFactoryESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesFactoryESTest.java
deleted file mode 100644
index 7ab5745..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesFactoryESTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:02:51 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true)
-public class MsoPropertiesFactoryESTest {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
-      // Undeclared exception!
-      try {
-        msoPropertiesFactory0.changeMsoPropertiesFilePath((String) null, "Unable to load the MSO properties file because format is not recognized (only .json or .properties): ");
-        fail("Expecting exception: NullPointerException");
-
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test1()  throws Throwable  {
-      MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
-      msoPropertiesFactory0.removeAllMsoProperties();
-  }
-
-  @Test(timeout = 4000)
-  public void test2()  throws Throwable  {
-      MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
-      try {
-        msoPropertiesFactory0.getMsoJavaProperties("iz/`I");
-        fail("Expecting exception: Exception");
-
-      } catch(Exception e) {
-         //
-         // Mso properties not found in cache:iz/`I
-         //
-         verifyException("org.openecomp.mso.properties.MsoPropertiesFactory", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test3()  throws Throwable  {
-      MsoPropertiesFactory msoPropertiesFactory0 = new MsoPropertiesFactory();
-      MsoPropertiesParameters msoPropertiesParameters0 = new MsoPropertiesParameters();
-      try {
-        PrivateAccess.callMethod((Class<MsoPropertiesFactory>) MsoPropertiesFactory.class, msoPropertiesFactory0, "createObjectType", (Object) msoPropertiesParameters0, (Class<?>) MsoPropertiesParameters.class, (Object) ":8nnlF[sGvCub6J", (Class<?>) String.class);
-        fail("Expecting exception: Exception");
-
-      } catch(Exception e) {
-         //
-         // Unable to load the MSO properties file because format is not recognized (only .json or .properties): :8nnlF[sGvCub6J
-         //
-         verifyException("org.openecomp.mso.properties.MsoPropertiesFactory", e);
-      }
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTest.java
deleted file mode 100644
index 9579b3b..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:09:37 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.junit.Test;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class MsoPropertiesParametersESTest extends MsoPropertiesParametersESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoPropertiesParameters msoPropertiesParameters0 = new MsoPropertiesParameters();
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTestscaffolding.java
deleted file mode 100644
index fec0b9e..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoPropertiesParametersESTestscaffolding.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:09:37 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MsoPropertiesParametersESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoPropertiesParameters"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoPropertiesParametersESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.properties.MsoPropertiesParameters"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoPropertiesParametersESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.openecomp.mso.logger.MsoLogger",
-      "com.att.eelf.i18n.EELFResourceManager",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
-      "org.apache.xerces.jaxp.SAXParserImpl",
-      "org.apache.xerces.parsers.XMLParser",
-      "org.apache.xerces.parsers.AbstractSAXParser",
-      "org.apache.xerces.parsers.SAXParser",
-      "org.apache.xerces.parsers.ObjectFactory",
-      "org.apache.xerces.util.ParserConfigurationSettings",
-      "org.apache.xerces.parsers.XML11Configuration",
-      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
-      "org.apache.xerces.util.SymbolTable",
-      "org.apache.xerces.impl.XMLEntityManager",
-      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
-      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
-      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
-      "org.apache.xerces.impl.XMLEntityScanner$1",
-      "org.apache.xerces.impl.XMLEntityScanner",
-      "org.apache.xerces.impl.XMLErrorReporter",
-      "org.apache.xerces.impl.XMLScanner",
-      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
-      "org.apache.xerces.impl.XMLDocumentScannerImpl",
-      "org.apache.xerces.util.XMLStringBuffer",
-      "org.apache.xerces.util.XMLAttributesImpl",
-      "org.apache.xerces.impl.XMLDTDScannerImpl",
-      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
-      "org.apache.xerces.impl.dtd.XMLDTDValidator",
-      "org.apache.xerces.impl.validation.ValidationState",
-      "org.apache.xerces.impl.dtd.XMLElementDecl",
-      "org.apache.xerces.impl.dtd.XMLSimpleType",
-      "org.apache.xerces.impl.dv.DTDDVFactory",
-      "org.apache.xerces.impl.dv.ObjectFactory",
-      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
-      "org.apache.xerces.impl.XMLVersionDetector",
-      "org.apache.xerces.impl.msg.XMLMessageFormatter",
-      "org.apache.xerces.impl.io.UTF8Reader",
-      "org.apache.xerces.util.XMLSymbols",
-      "org.apache.xerces.xni.NamespaceContext",
-      "org.apache.xerces.util.XMLChar",
-      "org.apache.xerces.impl.Constants",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "com.att.eelf.configuration.EELFManager",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.properties.AbstractMsoProperties"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTest.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTest.java
deleted file mode 100644
index a7efa76..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:01:07 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.junit.Test;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class MsoPropertyInitializerESTest extends MsoPropertyInitializerESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoPropertyInitializer msoPropertyInitializer0 = new MsoPropertyInitializer();
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTestscaffolding.java
deleted file mode 100644
index 9a056fb..0000000
--- a/common/src/test/java/org/openecomp/mso/properties/MsoPropertyInitializerESTestscaffolding.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:01:07 GMT 2016
- */
-
-package org.openecomp.mso.properties;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class MsoPropertyInitializerESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.properties.MsoPropertyInitializer"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MsoPropertyInitializerESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.properties.AbstractMsoProperties",
-      "org.apache.xerces.xni.parser.XMLDTDContentModelFilter",
-      "org.apache.xerces.xs.PSVIProvider",
-      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
-      "org.apache.xerces.impl.dtd.XMLEntityDecl",
-      "org.apache.xerces.xs.ItemPSVI",
-      "org.apache.xerces.xni.parser.XMLEntityResolver",
-      "org.apache.xerces.impl.dtd.XMLNSDTDValidator",
-      "org.apache.xerces.impl.XMLDTDScannerImpl",
-      "org.apache.xerces.parsers.ObjectFactory",
-      "org.apache.xerces.xni.parser.XMLConfigurationException",
-      "org.apache.xerces.impl.XML11NSDocumentScannerImpl",
-      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
-      "org.apache.xerces.parsers.SAXParser",
-      "com.att.eelf.i18n.EELFResolvableErrorEnum",
-      "org.apache.xerces.xni.XMLResourceIdentifier",
-      "org.apache.xerces.impl.XMLEntityManager$RewindableInputStream",
-      "org.apache.xerces.impl.XMLEntityManager",
-      "org.apache.xerces.impl.dtd.XMLDTDDescription",
-      "org.apache.xerces.xni.parser.XMLInputSource",
-      "com.att.eelf.i18n.EELFMsgs",
-      "org.apache.xerces.xni.parser.XMLComponentManager",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "org.apache.xerces.impl.io.UTF8Reader",
-      "org.apache.xerces.impl.dv.InvalidDatatypeValueException",
-      "org.apache.xerces.jaxp.UnparsedEntityHandler",
-      "org.apache.xerces.parsers.AbstractXMLDocumentParser",
-      "org.apache.xerces.impl.XMLScanner",
-      "org.apache.xerces.impl.dtd.XMLSimpleType",
-      "org.apache.xerces.impl.XML11DocumentScannerImpl",
-      "org.apache.xerces.xni.parser.XMLParseException",
-      "org.apache.xerces.util.AugmentationsImpl$AugmentationsItemsContainer",
-      "org.apache.xerces.impl.XMLEntityScanner",
-      "org.apache.xerces.util.URI$MalformedURIException",
-      "org.apache.xerces.util.XMLChar",
-      "org.apache.xerces.impl.XMLNSDocumentScannerImpl",
-      "org.apache.xerces.impl.XML11DTDScannerImpl",
-      "org.apache.xerces.util.URI",
-      "org.apache.xerces.xni.parser.XMLDocumentFilter",
-      "org.apache.xerces.xni.parser.XMLDTDSource",
-      "org.apache.xerces.impl.dtd.XMLElementDecl",
-      "org.apache.xerces.impl.dtd.XMLAttributeDecl",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "org.apache.xerces.xni.grammars.Grammar",
-      "org.apache.xerces.parsers.XMLParser",
-      "org.apache.xerces.impl.dtd.models.ContentModelValidator",
-      "com.att.eelf.configuration.EELFLogger",
-      "org.apache.xerces.xni.grammars.XMLGrammarLoader",
-      "org.apache.xerces.xni.XMLDocumentHandler",
-      "org.openecomp.mso.properties.MsoJavaProperties",
-      "org.apache.xerces.util.SymbolTable",
-      "org.apache.xerces.impl.io.UCSReader",
-      "org.apache.xerces.impl.XMLEntityManager$CharacterBuffer",
-      "org.apache.xerces.impl.io.Latin1Reader",
-      "org.apache.xerces.impl.dv.ValidationContext",
-      "org.apache.xerces.impl.dtd.XMLDTDValidator",
-      "org.apache.xerces.impl.dtd.XML11NSDTDValidator",
-      "org.apache.xerces.impl.validation.ValidationState",
-      "org.apache.xerces.impl.XMLEntityManager$Entity",
-      "org.apache.xerces.util.XMLResourceIdentifierImpl",
-      "org.apache.xerces.util.AugmentationsImpl",
-      "org.apache.xerces.impl.dv.ObjectFactory",
-      "org.apache.xerces.impl.dv.DatatypeValidator",
-      "org.apache.xerces.xni.NamespaceContext",
-      "org.apache.xerces.impl.dtd.XMLDTDLoader",
-      "org.apache.xerces.jaxp.SAXParserImpl",
-      "org.apache.xerces.util.XMLSymbols",
-      "org.apache.xerces.parsers.ObjectFactory$ConfigurationError",
-      "org.apache.xerces.xni.grammars.XMLGrammarDescription",
-      "org.apache.xerces.xni.parser.XMLErrorHandler",
-      "org.apache.xerces.impl.io.ASCIIReader",
-      "org.apache.xerces.util.MessageFormatter",
-      "org.openecomp.mso.properties.MsoPropertiesParameters",
-      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
-      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
-      "org.apache.xerces.xni.parser.XMLDTDScanner",
-      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
-      "org.apache.xerces.xni.XMLAttributes",
-      "org.apache.xerces.impl.io.MalformedByteSequenceException",
-      "org.apache.xerces.impl.Constants$ArrayEnumeration",
-      "org.apache.xerces.impl.XML11EntityScanner",
-      "org.apache.xerces.impl.dtd.DTDGrammar",
-      "org.apache.xerces.impl.dv.DTDDVFactory",
-      "com.att.eelf.configuration.SLF4jWrapper",
-      "org.openecomp.mso.properties.MsoPropertiesException",
-      "org.apache.xerces.impl.validation.ValidationManager",
-      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
-      "org.apache.xerces.xni.XNIException",
-      "org.apache.xerces.impl.dtd.XMLContentSpec",
-      "org.openecomp.mso.logger.MsoLogger",
-      "org.apache.xerces.xs.AttributePSVI",
-      "org.apache.xerces.impl.dtd.DTDGrammarBucket",
-      "org.apache.xerces.impl.msg.XMLMessageFormatter",
-      "org.apache.xerces.xni.parser.XMLDocumentScanner",
-      "org.apache.xerces.impl.XMLVersionDetector",
-      "org.apache.xerces.impl.XMLDocumentScannerImpl",
-      "org.apache.xerces.xni.parser.XMLPullParserConfiguration",
-      "org.apache.xerces.xni.parser.XMLDocumentSource",
-      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Dispatcher",
-      "org.openecomp.mso.properties.MsoPropertiesFactory",
-      "org.apache.xerces.xni.XMLDTDContentModelHandler",
-      "org.apache.xerces.impl.xs.XMLSchemaValidator",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.apache.xerces.xni.grammars.XMLDTDDescription",
-      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
-      "org.apache.xerces.impl.XMLErrorReporter",
-      "org.apache.xerces.xni.QName",
-      "org.apache.xerces.jaxp.TeeXMLDocumentFilterImpl",
-      "org.apache.xerces.util.XMLAttributesImpl",
-      "org.apache.xerces.impl.Constants",
-      "org.apache.xerces.util.XMLStringBuffer",
-      "org.apache.xerces.impl.XMLEntityManager$InternalEntity",
-      "org.apache.xerces.jaxp.JAXPConstants",
-      "org.openecomp.mso.properties.MsoPropertiesParameters$MsoPropertiesType",
-      "org.apache.xerces.impl.RevalidationHandler",
-      "org.apache.xerces.xni.parser.XMLParserConfiguration",
-      "org.apache.xerces.xni.XMLString",
-      "org.apache.xerces.impl.dv.DVFactoryException",
-      "org.apache.xerces.impl.dv.DatatypeException",
-      "org.apache.xerces.parsers.XML11Configurable",
-      "org.apache.xerces.util.AugmentationsImpl$LargeContainer",
-      "org.apache.xerces.impl.dtd.BalancedDTDGrammar",
-      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
-      "org.apache.xerces.xni.XMLDTDHandler",
-      "org.apache.xerces.impl.dtd.XML11DTDProcessor",
-      "org.apache.xerces.parsers.XML11Configuration",
-      "org.apache.xerces.impl.dtd.XMLDTDValidatorFilter",
-      "org.apache.xerces.impl.xs.identity.FieldActivator",
-      "org.apache.xerces.impl.XMLEntityScanner$1",
-      "com.att.eelf.i18n.EELFResourceManager",
-      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
-      "org.apache.xerces.xs.ElementPSVI",
-      "org.apache.xerces.parsers.AbstractSAXParser",
-      "org.apache.xerces.xni.parser.XMLDTDFilter",
-      "org.apache.xerces.xni.parser.XMLDTDContentModelSource",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
-      "org.openecomp.mso.properties.MsoJsonProperties",
-      "org.openecomp.mso.entity.MsoRequest",
-      "org.openecomp.mso.properties.MsoPropertyInitializer",
-      "org.openecomp.mso.logger.MsoLogger$StatusCode",
-      "org.apache.xerces.xni.XMLLocator",
-      "com.att.eelf.configuration.EELFManager",
-      "org.apache.xerces.impl.validation.EntityState",
-      "org.apache.xerces.impl.XMLEntityManager$ExternalEntity",
-      "org.apache.xerces.util.ParserConfigurationSettings",
-      "org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser",
-      "org.apache.xerces.xni.Augmentations",
-      "org.apache.xerces.impl.XMLEntityHandler",
-      "org.apache.xerces.impl.dv.ObjectFactory$ConfigurationError",
-      "org.apache.xerces.xni.parser.XMLComponent",
-      "com.att.eelf.i18n.EELFResourceManager$1",
-      "org.apache.xerces.impl.dtd.XML11DTDValidator",
-      "org.apache.xerces.impl.XMLEntityManager$ScannedEntity",
-      "org.apache.xerces.jaxp.JAXPValidatorComponent"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MsoPropertyInitializerESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "com.att.eelf.i18n.EELFResourceManager",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
-      "org.openecomp.mso.logger.MsoLogger",
-      "com.att.eelf.i18n.EELFMsgs",
-      "com.att.eelf.i18n.EELFResourceManager$RESOURCE_TYPES",
-      "org.apache.xerces.jaxp.SAXParserFactoryImpl",
-      "org.apache.xerces.jaxp.SAXParserImpl",
-      "org.apache.xerces.parsers.XMLParser",
-      "org.apache.xerces.parsers.AbstractSAXParser",
-      "org.apache.xerces.parsers.SAXParser",
-      "org.apache.xerces.parsers.ObjectFactory",
-      "org.apache.xerces.util.ParserConfigurationSettings",
-      "org.apache.xerces.parsers.XML11Configuration",
-      "org.apache.xerces.parsers.XIncludeAwareParserConfiguration",
-      "org.apache.xerces.util.SymbolTable",
-      "org.apache.xerces.impl.XMLEntityManager",
-      "org.apache.xerces.util.AugmentationsImpl$SmallContainer",
-      "org.apache.xerces.impl.XMLEntityManager$ByteBufferPool",
-      "org.apache.xerces.impl.XMLEntityManager$CharacterBufferPool",
-      "org.apache.xerces.impl.XMLEntityScanner$1",
-      "org.apache.xerces.impl.XMLEntityScanner",
-      "org.apache.xerces.impl.XMLErrorReporter",
-      "org.apache.xerces.impl.XMLScanner",
-      "org.apache.xerces.impl.XMLDocumentFragmentScannerImpl",
-      "org.apache.xerces.impl.XMLDocumentScannerImpl",
-      "org.apache.xerces.util.XMLStringBuffer",
-      "org.apache.xerces.util.XMLAttributesImpl",
-      "org.apache.xerces.impl.XMLDTDScannerImpl",
-      "org.apache.xerces.impl.dtd.XMLDTDProcessor",
-      "org.apache.xerces.impl.dtd.XMLDTDValidator",
-      "org.apache.xerces.impl.validation.ValidationState",
-      "org.apache.xerces.impl.dtd.XMLElementDecl",
-      "org.apache.xerces.impl.dtd.XMLSimpleType",
-      "org.apache.xerces.impl.dv.DTDDVFactory",
-      "org.apache.xerces.impl.dv.ObjectFactory",
-      "org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl",
-      "org.apache.xerces.impl.XMLVersionDetector",
-      "org.apache.xerces.impl.msg.XMLMessageFormatter",
-      "org.apache.xerces.impl.io.UTF8Reader",
-      "org.apache.xerces.util.XMLSymbols",
-      "org.apache.xerces.xni.NamespaceContext",
-      "org.apache.xerces.util.XMLChar",
-      "org.apache.xerces.impl.Constants",
-      "com.att.eelf.configuration.EELFLogger$Level",
-      "com.att.eelf.configuration.EELFManager",
-      "org.openecomp.mso.properties.MsoPropertiesFactory"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java b/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java
deleted file mode 100644
index 212fe95..0000000
--- a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:02:57 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-import java.util.List;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class CheckResultsESTest extends CheckResultsESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test00()  throws Throwable  {
-      CheckResults checkResults0 = new CheckResults();
-      checkResults0.addHostCheckResult("GP<QUZyf\"vf-sD", (-1), "");
-  }
-
-  @Test(timeout = 4000)
-  public void test01()  throws Throwable  {
-      CheckResults checkResults0 = new CheckResults();
-      PrivateAccess.setVariable((Class<CheckResults>) CheckResults.class, checkResults0, "results", (Object) null);
-      List<CheckResults.CheckResult> list0 = checkResults0.getResults();
-      assertNull(list0);
-  }
-
-  @Test(timeout = 4000)
-  public void test02()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      checkResults_CheckResult0.setOutput("xp");
-      assertEquals(0, checkResults_CheckResult0.getState());
-  }
-
-  @Test(timeout = 4000)
-  public void test03()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      checkResults_CheckResult0.setType("2");
-      assertEquals(0, checkResults_CheckResult0.getState());
-  }
-
-  @Test(timeout = 4000)
-  public void test04()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      checkResults_CheckResult0.setState(1);
-      assertEquals(1, checkResults_CheckResult0.getState());
-  }
-
-  @Test(timeout = 4000)
-  public void test05()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      checkResults_CheckResult0.setServicename("9~");
-      assertEquals(0, checkResults_CheckResult0.getState());
-  }
-
-  @Test(timeout = 4000)
-  public void test06()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      checkResults_CheckResult0.setHostname((String) null);
-      assertNull(checkResults_CheckResult0.getServicename());
-  }
-
-  @Test(timeout = 4000)
-  public void test07()  throws Throwable  {
-      CheckResults checkResults0 = new CheckResults();
-      checkResults0.addHostCheckResult("GP<QUZyf\"vf-sD", 0, "GP<QUZyf\"vf-sD");
-      List<CheckResults.CheckResult> list0 = checkResults0.getResults();
-      assertEquals(1, list0.size());
-  }
-
-  @Test(timeout = 4000)
-  public void test08()  throws Throwable  {
-      CheckResults checkResults0 = new CheckResults();
-      List<CheckResults.CheckResult> list0 = checkResults0.getResults();
-      assertTrue(list0.isEmpty());
-  }
-
-  @Test(timeout = 4000)
-  public void test09()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      String string0 = checkResults_CheckResult0.getServicename();
-      assertNull(string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test10()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      int int0 = checkResults_CheckResult0.getState();
-      assertEquals(0, int0);
-  }
-
-  @Test(timeout = 4000)
-  public void test11()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      String string0 = checkResults_CheckResult0.getHostname();
-      assertNull(string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test12()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      String string0 = checkResults_CheckResult0.getType();
-      assertNull(string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test13()  throws Throwable  {
-      CheckResults checkResults0 = new CheckResults();
-      checkResults0.addServiceCheckResult("", "Ifp73+/", 0, " ");
-  }
-
-  @Test(timeout = 4000)
-  public void test14()  throws Throwable  {
-      CheckResults.CheckResult checkResults_CheckResult0 = new CheckResults.CheckResult();
-      String string0 = checkResults_CheckResult0.getOutput();
-      assertNull(string0);
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java
deleted file mode 100644
index a4fea26..0000000
--- a/common/src/test/java/org/openecomp/mso/utils/CheckResultsESTestscaffolding.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:02:57 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class CheckResultsESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.utils.CheckResults"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CheckResultsESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.utils.CheckResults$CheckResult",
-      "org.openecomp.mso.utils.CheckResults"
-    );
-  } 
-
-  private static void resetClasses() {
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java b/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
deleted file mode 100644
index 59e8cec..0000000
--- a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 09:07:10 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.runtime.EvoAssertions.*;
-
-import javax.crypto.BadPaddingException;
-import javax.crypto.IllegalBlockSizeException;
-import java.security.InvalidKeyException;
-
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class CryptoUtilsESTest extends CryptoUtilsESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test00()  throws Throwable  {
-      CryptoUtils.decrypt("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", "00000000000000000000000000000000");
-  }
-
-  @Test(timeout = 4000)
-  public void test01()  throws Throwable  {
-      byte[] byteArray0 = new byte[0];
-      CryptoUtils.byteArrayToHexString(byteArray0);
-  }
-
-  @Test(timeout = 4000)
-  public void test02()  throws Throwable  {
-      // Undeclared exception!
-      try { 
-        CryptoUtils.encrypt("AES", "w^p&|^Cvs@K.@@");
-        fail("Expecting exception: NumberFormatException");
-      
-      } catch(NumberFormatException e) {
-         //
-         // For input string: \"w^\"
-         //
-         verifyException("java.lang.NumberFormatException", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test03()  throws Throwable  {
-      // Undeclared exception!
-      try { 
-        CryptoUtils.encrypt((String) null, "B2000000000000000000000000000000");
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.openecomp.mso.utils.CryptoUtils", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test04()  throws Throwable  {
-      try { 
-        CryptoUtils.decrypt("B20000000000000000000000000000000000000000000000", "B20000000000000000000000000000000000000000000000");
-        fail("Expecting exception: IllegalBlockSizeException");
-      
-      } catch(IllegalBlockSizeException | InvalidKeyException e) {
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test05()  throws Throwable  {
-      try { 
-        CryptoUtils.decrypt("0000C200000000000000000000000000", "0000C200000000000000000000000000");
-        fail("Expecting exception: BadPaddingException");
-      
-      } catch(BadPaddingException e) {
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test06()  throws Throwable  {
-      // Undeclared exception!
-      try { 
-        CryptoUtils.decrypt("s.", "s.");
-        fail("Expecting exception: NumberFormatException");
-      
-      } catch(NumberFormatException e) {
-         //
-         // For input string: \"s.\"
-         //
-         verifyException("java.lang.NumberFormatException", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test07()  throws Throwable  {
-      // Undeclared exception!
-      try { 
-        CryptoUtils.decrypt("", "");
-        fail("Expecting exception: IllegalArgumentException");
-      
-      } catch(IllegalArgumentException e) {
-         //
-         // Empty key
-         //
-         verifyException("javax.crypto.spec.SecretKeySpec", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test08()  throws Throwable  {
-      // Undeclared exception!
-      try { 
-        CryptoUtils.byteArrayToHexString((byte[]) null);
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.openecomp.mso.utils.CryptoUtils", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test09()  throws Throwable  {
-      byte[] byteArray0 = new byte[16];
-      byteArray0[0] = (byte) (-78);
-      String string0 = CryptoUtils.byteArrayToHexString(byteArray0);
-      assertEquals("B2000000000000000000000000000000", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test10()  throws Throwable  {
-      String string0 = CryptoUtils.encrypt("00000000000000000000000000000000", "00000000000000000000000000000000");
-      assertEquals("E08682BE5F2B18A6E8437A15B110D418E08682BE5F2B18A6E8437A15B110D4180143DB63EE66B0CDFF9F69917680151E", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test11()  throws Throwable  {
-      // Undeclared exception!
-      try { 
-        CryptoUtils.encrypt("", "");
-        fail("Expecting exception: IllegalArgumentException");
-      
-      } catch(IllegalArgumentException e) {
-         //
-         // Empty key
-         //
-         verifyException("javax.crypto.spec.SecretKeySpec", e);
-      }
-  }
-
-  @Test(timeout = 4000)
-  public void test12()  throws Throwable  {
-      CryptoUtils cryptoUtils0 = new CryptoUtils();
-  }
-
-  @Test(timeout = 4000)
-  public void test13()  throws Throwable  {
-      // Undeclared exception!
-      try { 
-        CryptoUtils.decrypt((String) null, "00000000000000000000000000000000");
-        fail("Expecting exception: NullPointerException");
-      
-      } catch(NullPointerException e) {
-         //
-         // no message in exception (getMessage() returned null)
-         //
-         verifyException("org.openecomp.mso.utils.CryptoUtils", e);
-      }
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java
deleted file mode 100644
index 0957415..0000000
--- a/common/src/test/java/org/openecomp/mso/utils/CryptoUtilsESTestscaffolding.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 09:07:10 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class CryptoUtilsESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.utils.CryptoUtils"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(CryptoUtilsESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.utils.CryptoUtils"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(CryptoUtilsESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "org.openecomp.mso.utils.CryptoUtils"
-    );
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java b/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java
deleted file mode 100644
index fa8517e..0000000
--- a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file was automatically generated by EvoSuite
- * Mon Nov 14 08:02:03 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.evosuite.shaded.org.mockito.Mockito.*;
-
-import org.openecomp.mso.logger.MsoLogger;
-import org.evosuite.runtime.EvoRunner;
-import org.evosuite.runtime.EvoRunnerParameters;
-import org.evosuite.runtime.PrivateAccess;
-import org.evosuite.runtime.ViolatedAssumptionAnswer;
-import org.junit.runner.RunWith;
-
-@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) 
-public class UUIDCheckerESTest extends UUIDCheckerESTestscaffolding {
-
-  @Test(timeout = 4000)
-  public void test0()  throws Throwable  {
-      MsoLogger msoLogger0 = mock(MsoLogger.class, new ViolatedAssumptionAnswer());
-      String string0 = UUIDChecker.generateServiceInstanceID(msoLogger0);
-      assertEquals("00000000-0100-4000-8200-000003000000", string0);
-  }
-
-  @Test(timeout = 4000)
-  public void test1()  throws Throwable  {
-      UUIDChecker uUIDChecker0 = (UUIDChecker)PrivateAccess.callDefaultConstructorOfTheClassUnderTest();
-      assertNotNull(uUIDChecker0);
-  }
-}
diff --git a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java b/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java
deleted file mode 100644
index 15397cb..0000000
--- a/common/src/test/java/org/openecomp/mso/utils/UUIDCheckerESTestscaffolding.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Scaffolding file used to store all the setups needed to run 
- * tests automatically generated by EvoSuite
- * Mon Nov 14 08:02:03 GMT 2016
- */
-
-package org.openecomp.mso.utils;
-
-import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
-import org.junit.BeforeClass;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.evosuite.runtime.sandbox.Sandbox;
-
-@EvoSuiteClassExclude
-public class UUIDCheckerESTestscaffolding {
-
-  @org.junit.Rule 
-  public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
-
-  private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); 
-
-  private org.evosuite.runtime.thread.ThreadStopper threadStopper =  new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
-
-  @BeforeClass 
-  public static void initEvoSuiteFramework() { 
-    org.evosuite.runtime.RuntimeSettings.className = "org.openecomp.mso.utils.UUIDChecker"; 
-    org.evosuite.runtime.GuiSupport.initialize(); 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; 
-    org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; 
-    org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; 
-    org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; 
-    org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.init(); 
-    initializeClasses();
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-  } 
-
-  @AfterClass 
-  public static void clearEvoSuiteFramework(){ 
-    Sandbox.resetDefaultSecurityManager(); 
-    java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); 
-  } 
-
-  @Before 
-  public void initTestCase(){ 
-    threadStopper.storeCurrentThreads();
-    threadStopper.startRecordingTime();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); 
-    org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); 
-     
-    org.evosuite.runtime.GuiSupport.setHeadless(); 
-    org.evosuite.runtime.Runtime.getInstance().resetRuntime(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.activate(); 
-  } 
-
-  @After 
-  public void doneWithTestCase(){ 
-    threadStopper.killAndJoinClientThreads();
-    org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); 
-    org.evosuite.runtime.classhandling.JDKClassResetter.reset(); 
-    resetClasses(); 
-    org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); 
-    org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); 
-    org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); 
-  } 
-
-
-  private static void initializeClasses() {
-    org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(UUIDCheckerESTestscaffolding.class.getClassLoader() ,
-      "org.openecomp.mso.logger.MsoLogger",
-      "org.openecomp.mso.logger.MessageEnum",
-      "com.att.eelf.i18n.EELFResolvableErrorEnum",
-      "org.openecomp.mso.logger.MsoLogger$ResponseCode",
-      "org.openecomp.mso.logger.MsoLogger$Catalog",
-      "org.openecomp.mso.entity.MsoRequest",
-      "org.openecomp.mso.logger.MsoLogger$StatusCode",
-      "com.att.eelf.i18n.EELFResourceManager",
-      "org.openecomp.mso.logger.MsoLogger$ErrorCode",
-      "org.openecomp.mso.utils.UUIDChecker"
-    );
-  } 
-
-  private static void resetClasses() {
-    org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(UUIDCheckerESTestscaffolding.class.getClassLoader());
-
-    org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
-      "com.att.eelf.i18n.EELFResourceManager",
-      "org.openecomp.mso.logger.MessageEnum",
-      "org.openecomp.mso.logger.MsoLogger"
-    );
-  }
-}
