diff --git a/sdnr/wt/common/pom.xml b/sdnr/wt/common/pom.xml
index fd2bb46..6fba87a 100644
--- a/sdnr/wt/common/pom.xml
+++ b/sdnr/wt/common/pom.xml
@@ -91,7 +91,10 @@
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
         </dependency>
-
+        <dependency>
+              <groupId>com.google.code.findbugs</groupId>
+              <artifactId>annotations</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
@@ -117,7 +120,7 @@
                     <clusterName>testCluster</clusterName>
                     <transportPort>9500</transportPort>
                     <httpPort>${databaseport}</httpPort>
-                    <version>6.5.0</version>
+                    <version>7.1.1</version>
                     <timeout>120</timeout>
                 </configuration>
                 <executions>
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/HtAssert.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/HtAssert.java
index 99a0aaa..976213f 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/HtAssert.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/HtAssert.java
@@ -21,6 +21,8 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.common;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.Arrays;
 
 /**
@@ -45,7 +47,7 @@
 
     };
 
-    private static String whoCalledMe() {
+    public static String whoCalledMe() {
         StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
         StackTraceElement caller = stackTraceElements[3];
         String classname = caller.getClassName();
@@ -54,4 +56,17 @@
         return classname + "." + methodName + ":" + lineNumber;
     }
 
+    public static String whoCalledMeAll() {
+        //		StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
+        //		StringBuilder line =new StringBuilder();
+        //		for(StackTraceElement caller:stackTraceElements) {
+        //			line.append(String.format("%s | %s:%d\n",caller.getClassName(),caller.getMethodName(),caller.getLineNumber()));
+        //		}
+        //		return line.toString();
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        new Throwable().printStackTrace(pw);
+        return sw.toString();
+    }
+
 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/Section.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/Section.java
index 54ebd03..7fb58a1 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/Section.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/Section.java
@@ -25,29 +25,41 @@
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.Optional;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.eclipse.jdt.annotation.NonNull;
 import org.onap.ccsdk.features.sdnr.wt.common.configuration.exception.ConversionException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * 
+ *
  * @author Michael Dürre, Herbert Eiselt
  *
  *         subset of configuration identified by its name
  */
 public class Section {
 
+    //Interfaces
+    public interface EnvGetter {
+        String getenv(String substring);
+    }
+
     // constants
     private static final Logger LOG = LoggerFactory.getLogger(Section.class);
     private static final String DELIMITER = "=";
     private static final String COMMENTCHARS[] = {"#", ";"};
+    private static final String ENVVARIABLE = "${";
+    private static final String REGEXENVVARIABLE = "(\\$\\{[A-Z0-9_-]+\\})";
     // end of constants
+    private final Pattern pattern;
 
-    // variables
+    // variables for test purpose
+    private static EnvGetter envGetter = (mkey) -> System.getenv(mkey);
+
     private final String name;
     private final List<String> rawLines;
     private final LinkedHashMap<String, SectionValue> values;
@@ -59,6 +71,7 @@
         this.name = name;
         this.rawLines = new ArrayList<>();
         this.values = new LinkedHashMap<>();
+        this.pattern = Pattern.compile(REGEXENVVARIABLE);
     }
     //end of constructors
 
@@ -96,11 +109,9 @@
             value = values.get(key).getValue();
         }
         //try to read env var
-        if (value != null && value.contains("${")) {
+        if (value != null && value.contains(ENVVARIABLE)) {
 
             LOG.debug("try to find env var(s) for {}", value);
-            final String regex = "(\\$\\{[A-Z0-9_-]+\\})";
-            final Pattern pattern = Pattern.compile(regex);
             final Matcher matcher = pattern.matcher(value);
             String tmp = new String(value);
             while (matcher.find() && matcher.groupCount() > 0) {
@@ -108,7 +119,8 @@
                 if (mkey != null) {
                     try {
                         LOG.debug("match found for v={} and env key={}", tmp, mkey);
-                        String env = System.getenv(mkey.substring(2, mkey.length() - 1));
+                        //String env=System.getenv(mkey.substring(2,mkey.length()-1));
+                        String env = envGetter.getenv(mkey.substring(2, mkey.length() - 1));
                         tmp = tmp.replace(mkey, env == null ? "" : env);
                     } catch (SecurityException e) {
                         LOG.warn("unable to read env {}: {}", value, e);
@@ -120,8 +132,6 @@
         return value;
     }
 
-
-
     public void setProperty(String key, String value) {
         boolean isuncommented = this.isCommentLine(key);
         if (isuncommented) {
@@ -170,8 +180,6 @@
         }
     }
 
-
-
     public String[] toLines() {
         List<String> lines = new ArrayList<>();
         if (!this.name.isEmpty()) {
@@ -242,6 +250,19 @@
     public String toString() {
         return "Section [name=" + name + ", rawLines=" + rawLines + ", values=" + values + "]";
     }
+
+    // static methods
+    public static void setEnvGetter(@NonNull EnvGetter newEnvGetter) {
+        if (Objects.nonNull(newEnvGetter)) {
+            envGetter = newEnvGetter;
+        } else {
+            throw new IllegalArgumentException("Null not allowed here");
+        }
+    }
+
+    public static EnvGetter getEnvGetter() {
+        return envGetter;
+    }
     // end of public methods
 
 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/DatabaseClient.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/DatabaseClient.java
index 3a9c105..fd72466 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/DatabaseClient.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/DatabaseClient.java
@@ -101,6 +101,30 @@
     public @Nullable String doWriteRaw(String indexName, String dataTypeName, @Nullable String esId, String json);
 
     /**
+     * Write one object into Database
+     * 
+     * @param indexName Name of index
+     * @param dataTypeName Name of datatype
+     * @param esId of object to be replaced or null for new entry.
+     * @param json String in JSON format.
+     * @param syncAfterRewrite trigger ES to sync after insert data
+     * @return esId String of the database object or null in case of write problems.
+     */
+    public @Nullable String doWriteRaw(String indexName, String dataTypeName, String esId, String json,
+            boolean syncAfterWrite);
+
+    /**
+     * Write one object into Database
+     * 
+     * @param dataTypeName Name of datatype
+     * @param esId of object to be replaced or null for new entry.
+     * @param json String in JSON format.
+     * @param syncAfterRewrite trigger ES to sync after insert data
+     * @return esId String of the database object or null in case of write problems.
+     */
+    public @Nullable String doWriteRaw(String dataTypeName, String esId, String json, boolean syncAfterWrite);
+
+    /**
      * Remove Object from database
      * 
      * @param dataTypeName of object
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/ExtRestClient.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/ExtRestClient.java
index 9d5e9f6..836c0fa 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/ExtRestClient.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/ExtRestClient.java
@@ -46,23 +46,30 @@
 import org.json.JSONException;
 import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo;
 import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo.Protocol;
+import org.onap.ccsdk.features.sdnr.wt.common.database.data.EsVersion;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.ClusterHealthRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.ClusterSettingsRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.CreateAliasRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.CreateIndexRequest;
+import org.onap.ccsdk.features.sdnr.wt.common.database.requests.Delete7Request;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.DeleteAliasRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.DeleteByQueryRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.DeleteIndexRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.DeleteRequest;
+import org.onap.ccsdk.features.sdnr.wt.common.database.requests.Get7Request;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.GetIndexRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.GetInfoRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.GetRequest;
+import org.onap.ccsdk.features.sdnr.wt.common.database.requests.Index7Request;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.IndexRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.ListAliasesRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.ListIndicesRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.NodeStatsRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.RefreshIndexRequest;
+import org.onap.ccsdk.features.sdnr.wt.common.database.requests.Search7Request;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.SearchRequest;
+import org.onap.ccsdk.features.sdnr.wt.common.database.requests.Update7Request;
+import org.onap.ccsdk.features.sdnr.wt.common.database.requests.UpdateByQuery7Request;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.UpdateByQueryRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.UpdateRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.ClusterHealthResponse;
@@ -84,6 +91,7 @@
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.UpdateByQueryResponse;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.UpdateResponse;
 import org.onap.ccsdk.features.sdnr.wt.common.http.BaseHTTPClient;
+import org.osgi.framework.Version;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -186,15 +194,34 @@
     //    }
 
     private final RestClient client;
+    private final boolean isES7;
 
-    protected ExtRestClient(HostInfo[] hosts) {
+    protected ExtRestClient(HostInfo[] hosts) throws Exception {
         this(hosts, null, null, false);
     }
 
-    protected ExtRestClient(HostInfo[] hosts, String username, String password, boolean trustAll) {
+    protected ExtRestClient(HostInfo[] hosts, String username, String password, boolean trustAll) throws Exception {
         this.client = RestClient.builder(get(hosts))
                 .setHttpClientConfigCallback(new BasicAuthHttpClientConfigCallback(username, password, trustAll))
                 .build();
+        EsVersion tmp = autoDetectVersion();
+        LOG.info("working with sdnrdb version {}", tmp.toString());
+        this.isES7 = tmp.isNewerOrEqualThan(new EsVersion(7, 0, 0));
+    }
+
+    /**
+     * @return
+     * @throws IOException
+     * @throws Exception
+     */
+    private EsVersion autoDetectVersion() throws IOException, Exception {
+        GetInfoResponse infoResponse = this.getInfo();
+        return infoResponse.getVersion();
+
+    }
+
+    public boolean isVersion7() {
+        return this.isES7;
     }
 
     public ClusterHealthResponse health(ClusterHealthRequest request)
@@ -207,7 +234,6 @@
 
     }
 
-    //
     public boolean indicesExists(GetIndexRequest request) throws IOException {
         Response response = this.client.performRequest(request.getInner());
         return response.getStatusLine().getStatusCode() == 200;
@@ -238,11 +264,17 @@
     }
 
     public IndexResponse index(IndexRequest request) throws IOException {
+        if (this.isES7 && !(request instanceof Index7Request)) {
+            request = new Index7Request(request);
+        }
         return new IndexResponse(this.client.performRequest(request.getInner()));
     }
 
     public DeleteResponse delete(DeleteRequest request) throws IOException {
         Response response = null;
+        if (this.isES7 && !(request instanceof Delete7Request)) {
+            request = new Delete7Request(request);
+        }
         try {
             response = this.client.performRequest(request.getInner());
         } catch (ResponseException e) {
@@ -274,6 +306,9 @@
      * @throws IOException of client
      */
     public SearchResponse search(SearchRequest request, boolean ignoreParseException) throws IOException {
+        if (this.isES7 && !(request instanceof Search7Request)) {
+            request = new Search7Request(request);
+        }
         if (ignoreParseException) {
             try {
                 return new SearchResponse(this.client.performRequest(request.getInner()));
@@ -287,6 +322,9 @@
     }
 
     public GetResponse get(GetRequest request) throws IOException {
+        if (this.isES7 && !(request instanceof Get7Request)) {
+            request = new Get7Request(request);
+        }
         try {
             return new GetResponse(this.client.performRequest(request.getInner()));
         } catch (ResponseException e) {
@@ -295,11 +333,17 @@
     }
 
     public UpdateByQueryResponse update(UpdateByQueryRequest request) throws IOException {
+        if (this.isES7 && !(request instanceof UpdateByQuery7Request)) {
+            request = new UpdateByQuery7Request(request);
+        }
         return new UpdateByQueryResponse(this.client.performRequest(request.getInner()));
 
     }
 
     public UpdateResponse update(UpdateRequest request) throws IOException {
+        if (this.isES7 && !(request instanceof Update7Request)) {
+            request = new Update7Request(request);
+        }
         return new UpdateResponse(this.client.performRequest(request.getInner()));
 
     }
@@ -356,15 +400,16 @@
         return httphosts;
     }
 
-    public static ExtRestClient createInstance(HostInfo[] hosts) {
+    public static ExtRestClient createInstance(HostInfo[] hosts) throws Exception {
         return new ExtRestClient(hosts);
     }
 
-    public static ExtRestClient createInstance(HostInfo[] hosts, String username, String password, boolean trustAll) {
+    public static ExtRestClient createInstance(HostInfo[] hosts, String username, String password, boolean trustAll)
+            throws Exception {
         return new ExtRestClient(hosts, username, password, trustAll);
     }
 
-    public static ExtRestClient createInstance(String hostname, int port, Protocol protocol) {
+    public static ExtRestClient createInstance(String hostname, int port, Protocol protocol) throws Exception {
         return createInstance(new HostInfo[] {new HostInfo(hostname, port, protocol)});
 
     }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/HtDatabaseClient.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/HtDatabaseClient.java
index e8d86a9..1ae9f1e 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/HtDatabaseClient.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/HtDatabaseClient.java
@@ -25,7 +25,6 @@
 import java.util.List;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-
 import org.json.JSONObject;
 import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo;
 import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
@@ -35,7 +34,6 @@
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.GetIndexRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.GetRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.IndexRequest;
-import org.onap.ccsdk.features.sdnr.wt.common.database.requests.RefreshIndexRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.SearchRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.UpdateByQueryRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.UpdateRequest;
@@ -43,7 +41,6 @@
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.DeleteResponse;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.GetResponse;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.IndexResponse;
-import org.onap.ccsdk.features.sdnr.wt.common.database.responses.RefreshIndexResponse;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.SearchResponse;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.UpdateByQueryResponse;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.UpdateResponse;
@@ -59,34 +56,69 @@
 public class HtDatabaseClient extends ExtRestClient implements DatabaseClient, AutoCloseable {
 
     private static final boolean REFRESH_AFTER_REWRITE_DEFAULT = true;
-    private static final boolean TRUSTALL_DEFAULT = false;
+    public static final boolean TRUSTALL_DEFAULT = false;
+    private static final long TIMOUT_MS_DEFAULT = 30000;
+    private static final long READ_MAX_SIZE = 9999;
+    private final static long SLEEPTIMEMS = 5000;
 
     private final Logger LOG = LoggerFactory.getLogger(HtDatabaseClient.class);
 
     private boolean doRefreshAfterWrite;
 
-    public HtDatabaseClient(HostInfo[] hosts) {
-        this(hosts, REFRESH_AFTER_REWRITE_DEFAULT);
-    }
-
-    public HtDatabaseClient(HostInfo[] hosts, boolean refreshAfterWrite) {
-        this(hosts, refreshAfterWrite, null, null, TRUSTALL_DEFAULT);
-    }
-
-    public HtDatabaseClient(HostInfo[] hosts, String username, String password) {
-        this(hosts, username, password, TRUSTALL_DEFAULT);
-    }
-
-    public HtDatabaseClient(HostInfo[] hosts, String username, String password, boolean trustAll) {
-        this(hosts, REFRESH_AFTER_REWRITE_DEFAULT, username, password, trustAll);
-    }
-
-    public HtDatabaseClient(HostInfo[] hosts, boolean refreshAfterWrite, String username, String password,
-            boolean trustAll) {
+    private HtDatabaseClient(HostInfo[] hosts, boolean refreshAfterWrite, String username, String password,
+            boolean trustAll) throws Exception {
         super(hosts, username, password, trustAll);
         this.doRefreshAfterWrite = refreshAfterWrite;
     }
 
+    /*----------------------------------
+     * static factory function
+     */
+
+    static public HtDatabaseClient getClient(HostInfo[] hosts) throws HtDatabaseClientException {
+        return getClient(hosts, REFRESH_AFTER_REWRITE_DEFAULT, null, null, TRUSTALL_DEFAULT, TIMOUT_MS_DEFAULT);
+    }
+
+    static public HtDatabaseClient getClient(HostInfo[] hosts, String username, String password)
+            throws HtDatabaseClientException {
+        return getClient(hosts, REFRESH_AFTER_REWRITE_DEFAULT, username, password, TRUSTALL_DEFAULT, TIMOUT_MS_DEFAULT);
+    }
+
+    static public HtDatabaseClient getClient(HostInfo[] hosts, String username, String password, boolean trustAll)
+            throws HtDatabaseClientException {
+        return getClient(hosts, REFRESH_AFTER_REWRITE_DEFAULT, username, password, trustAll, TIMOUT_MS_DEFAULT);
+    }
+
+    static public HtDatabaseClient getClient(HostInfo[] hosts, String username, String password, boolean trustAll,
+            long timeoutms) throws HtDatabaseClientException {
+        return getClient(hosts, REFRESH_AFTER_REWRITE_DEFAULT, username, password, trustAll, TIMOUT_MS_DEFAULT);
+    }
+
+    static public HtDatabaseClient getClient(HostInfo[] hosts, boolean refreshAfterWrite, String username,
+            String password, boolean trustAll, long timeoutms) throws HtDatabaseClientException {
+        long waiting = 0;
+        HtDatabaseClient client = null;
+        Exception exceptionWas = null;
+
+        do {
+            try {
+                client = new HtDatabaseClient(hosts, refreshAfterWrite, username, password, trustAll);
+                exceptionWas = null;
+            } catch (Exception e) {
+                try {
+                    Thread.sleep(SLEEPTIMEMS);
+                } catch (InterruptedException e1) {
+                    Thread.currentThread().interrupt();
+                }
+                waiting += SLEEPTIMEMS;
+                exceptionWas = e;
+            }
+        } while (client == null && waiting < timeoutms);
+        if (client == null) {
+            throw new HtDatabaseClientException("Can not reach database server. Client not started.", exceptionWas);
+        }
+        return client;
+    }
 
     /*----------------------------------
      * Functions
@@ -133,7 +165,17 @@
     }
 
     @Override
+    public String doWriteRaw(String dataTypeName, String esId, String json, boolean syncAfterWrite) {
+        return this.doWriteRaw(dataTypeName, dataTypeName, esId, json, syncAfterWrite);
+    }
+
+    @Override
     public @Nullable String doWriteRaw(String indexName, String dataTypeName, @Nullable String esId, String json) {
+        return this.doWriteRaw(indexName, dataTypeName, esId, json, this.doRefreshAfterWrite);
+    }
+
+    @Override
+    public String doWriteRaw(String indexName, String dataTypeName, String esId, String json, boolean syncAfterWrite) {
 
         IndexResponse response = null;
         IndexRequest indexRequest = new IndexRequest(indexName, dataTypeName, esId, this.doRefreshAfterWrite);
@@ -148,24 +190,9 @@
             LOG.warn("Response null during write: {} {}", esId, json);
             return null;
         }
-        //		if(this.doRefreshAfterWrite) {
-        //			this.doRefresh(dataTypeName);
-        //		}
         return response.getId();
     }
 
-    private void doRefresh(String dataTypeName) {
-        try {
-            RefreshIndexResponse response = this.refreshIndex(new RefreshIndexRequest(dataTypeName));
-            if (!response.succeeded()) {
-                LOG.warn("seems that index {} was not refreshed", dataTypeName);
-            }
-        } catch (IOException e) {
-            LOG.warn("problem with refreshing index: {}", e);
-        }
-
-    }
-
     @Override
     public boolean doRemove(String dataTypeName, IsEsObject esId) {
         return doRemove(dataTypeName, esId.getEsId());
@@ -181,9 +208,6 @@
         } catch (IOException e) {
             LOG.warn("Problem deleting from db: {}", e.getMessage());
         }
-        //		if(this.doRefreshAfterWrite) {
-        //			this.doRefresh(dataTypeName);
-        //		}
         return response != null ? response.isDeleted() : false;
     }
 
@@ -229,7 +253,6 @@
 
         long total = 0;
         LOG.debug("NetworkIndex query and read: {}", dataTypeName);
-
         SearchRequest searchRequest = new SearchRequest(alias, dataTypeName);
         searchRequest.setQuery(queryBuilder);
         SearchResponse response = null;
@@ -250,7 +273,8 @@
 
     @Override
     public @Nonnull SearchResult<SearchHit> doReadAllJsonData(String dataTypeName, boolean ignoreException) {
-        return doReadByQueryJsonData(dataTypeName, QueryBuilders.matchAllQuery(), ignoreException);
+        return doReadByQueryJsonData(dataTypeName, QueryBuilders.matchAllQuery().size(READ_MAX_SIZE).from(0),
+                ignoreException);
     }
 
     public @Nonnull SearchResult<SearchHit> doReadAllJsonData(String alias, String dataType, boolean ignoreException) {
@@ -277,11 +301,8 @@
             UpdateResponse response = this.update(request);
             success = response.succeeded();
         } catch (IOException e) {
-            LOG.warn("Problem updating {} with id {} and data {}: {}", dataTypeName, esId, json, e);
+            LOG.warn("Problem updating {} with id {} and data {}: '{}'", dataTypeName, esId, json, e.getMessage());
         }
-        //		if(this.doRefreshAfterWrite) {
-        //			this.doRefresh(dataTypeName);
-        //		}
         return success ? esId : null;
     }
 
@@ -296,9 +317,6 @@
         } catch (IOException e) {
             LOG.warn("Problem updating items in {} with query {} and data {}: {}", dataTypeName, query, json, e);
         }
-        //		if(this.doRefreshAfterWrite) {
-        //			this.doRefresh(dataTypeName);
-        //		}
         return success;
     }
 
@@ -315,11 +333,9 @@
         } catch (IOException e) {
             LOG.warn("Problem delete in {} with query {}:{} ", dataTypeName, query.toJSON(), e);
         }
-        //		if(this.doRefreshAfterWrite) {
-        //			this.doRefresh(dataTypeName);
-        //		}
         return del;
     }
 
 
+
 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/HtDatabaseClientException.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/HtDatabaseClientException.java
new file mode 100644
index 0000000..b1b3f72
--- /dev/null
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/HtDatabaseClientException.java
@@ -0,0 +1,45 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH 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.onap.ccsdk.features.sdnr.wt.common.database;
+
+public class HtDatabaseClientException extends Exception {
+    // constants
+    private static final long serialVersionUID = 1L;
+    // end of constants
+
+    // variables
+    private Throwable rootCause;
+    // end of variables
+
+    // constructors
+    public HtDatabaseClientException(String message, Throwable rootCause) {
+        super(message, rootCause);
+        this.rootCause = rootCause;
+    }
+    // end of constructors
+
+    // getters and setters
+    public Throwable getRootCause() {
+        return rootCause;
+    }
+    // end of getters and setters
+}
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/Portstatus.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/Portstatus.java
index 250842e..475178b 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/Portstatus.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/Portstatus.java
@@ -1,25 +1,30 @@
 /*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) Apache Camel project
- * =================================================================================================
- * 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
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END==========================================================================
+ * 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.onap.ccsdk.features.sdnr.wt.common.database;
 
 import java.io.IOException;
-import java.net.Socket;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.nio.channels.SocketChannel;
+
 import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo;
 
 public class Portstatus {
@@ -37,16 +42,16 @@
             throw new IllegalArgumentException("Invalid start port: " + port);
         }
 
-        Socket ss = null;
+        SocketChannel channel = null;
+        SocketAddress socketAddress = new InetSocketAddress(dnsName, port);
         try {
-            ss = new Socket(dnsName, port);
-            ss.setReuseAddress(true);
+            channel = SocketChannel.open(socketAddress);
             return true;
         } catch (IOException e) {
         } finally {
-            if (ss != null) {
+            if (channel != null) {
                 try {
-                    ss.close();
+                    channel.close();
                 } catch (IOException e) {
                     /* should not be thrown */
                 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/config/HostInfo.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/config/HostInfo.java
index cb04543..2dd05c5 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/config/HostInfo.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/config/HostInfo.java
@@ -96,7 +96,7 @@
         final Pattern pattern = Pattern.compile(regex);
         final Matcher matcher = pattern.matcher(dbUrl);
         if (!matcher.find() || matcher.groupCount() < 2) {
-            throw new ParseException("url " + dbUrl + " not parseable", 0);
+            throw new ParseException("url '" + dbUrl + "' not parseable. Expected http://xyz", 0);
         }
         Protocol p = Protocol.getValueOf(matcher.group(1));
         String host = matcher.group(2);
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/data/EsVersion.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/data/EsVersion.java
index 7d106df..1dd1c3d 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/data/EsVersion.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/data/EsVersion.java
@@ -48,6 +48,11 @@
         this.revision = Integer.parseInt(hlp[2]);
     }
 
+    @Override
+    public String toString() {
+        return String.format("%d.%d.%d", this.major, this.minor, this.revision);
+    }
+
     /**
      * @param major
      * @param minor
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/BaseRequest.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/BaseRequest.java
index 028de75..5e4467e 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/BaseRequest.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/BaseRequest.java
@@ -35,7 +35,7 @@
 
     private static final Logger LOG = LoggerFactory.getLogger(BaseRequest.class);
 
-    public static final int DEFAULT_RETRIES = 1;
+    public static final int DEFAULT_RETRIES = 3;
 
     protected final Request request;
     private String query;
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/ClusterSettingsRequest.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/ClusterSettingsRequest.java
index 1379da5..a852278 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/ClusterSettingsRequest.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/ClusterSettingsRequest.java
@@ -41,6 +41,7 @@
         this.persistent = new JSONObject();
         this.data.put("persistent", this.persistent);
         this.allowAutoCreateIndex(autoCreateIndex);
+
     }
 
     public ClusterSettingsRequest allowAutoCreateIndex(boolean allow) {
@@ -48,4 +49,11 @@
         this.setQuery(this.data);
         return this;
     }
+
+    public ClusterSettingsRequest maxCompilationsPerMinute(long executions) {
+        //this.persistent.put("script.max_compilations_per_minute" ,executions);
+        this.persistent.put("script.max_compilations_rate", String.format("%d/1m", executions));
+        this.setQuery(this.data);
+        return this;
+    }
 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/CreateIndexRequest.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/CreateIndexRequest.java
index 076032b..2d14f2d 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/CreateIndexRequest.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/CreateIndexRequest.java
@@ -54,9 +54,10 @@
         return this;
     }
 
-    public void settings(JSONObject settings) {
+    public CreateIndexRequest settings(JSONObject settings) {
         this.settings = settings;
         this.setRequest();
+        return this;
     }
 
     public boolean hasMappings() {
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Delete7Request.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Delete7Request.java
new file mode 100644
index 0000000..923bb77
--- /dev/null
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Delete7Request.java
@@ -0,0 +1,42 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH 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.onap.ccsdk.features.sdnr.wt.common.database.requests;
+
+/**
+ * @author Michael Dürre
+ *
+ */
+public class Delete7Request extends DeleteRequest {
+
+    public Delete7Request(String alias, String esId) {
+        super(alias, "_doc", esId);
+    }
+
+    public Delete7Request(String alias, String esId, boolean refresh) {
+        super(alias, "_doc", esId, refresh);
+    }
+
+    public Delete7Request(DeleteRequest request) {
+        this(request.getAlias(), request.getEsId(), request.doRefresh());
+    }
+
+}
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Get7Request.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Get7Request.java
new file mode 100644
index 0000000..3996a6f
--- /dev/null
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Get7Request.java
@@ -0,0 +1,41 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH 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.onap.ccsdk.features.sdnr.wt.common.database.requests;
+
+/**
+ * @author Michael Dürre
+ *
+ */
+public class Get7Request extends GetRequest {
+
+    public Get7Request(String alias, String esId) {
+        super(alias, "_doc", esId);
+    }
+
+    /**
+     * @param request
+     */
+    public Get7Request(GetRequest request) {
+        this(request.getAlias(), request.getEsId());
+    }
+
+}
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/GetRequest.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/GetRequest.java
index 6092d88..0ad7458 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/GetRequest.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/GetRequest.java
@@ -25,10 +25,20 @@
 
 public class GetRequest extends BaseRequest {
 
+    private final String alias;
+    private final String esId;
+
     public GetRequest(String alias, String dataType, @Nonnull String esId) {
         super("GET", String.format("/%s/%s/%s", alias, dataType, BaseRequest.urlEncodeValue(esId)));
+        this.alias = alias;
+        this.esId = esId;
     }
 
+    protected String getAlias() {
+        return this.alias;
+    }
 
-
+    protected String getEsId() {
+        return this.esId;
+    }
 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Index7Request.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Index7Request.java
new file mode 100644
index 0000000..f399032
--- /dev/null
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Index7Request.java
@@ -0,0 +1,50 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH 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.onap.ccsdk.features.sdnr.wt.common.database.requests;
+
+/**
+ * @author Michael Dürre
+ *
+ */
+public class Index7Request extends IndexRequest {
+
+    public Index7Request(String alias) {
+        super(alias, "_doc");
+    }
+
+    public Index7Request(String alias, String esId) {
+        super(alias, "_doc", esId);
+    }
+
+    public Index7Request(String alias, String esId, boolean refresh) {
+        super(alias, "_doc", esId, refresh);
+    }
+
+    /**
+     * @param request
+     */
+    public Index7Request(IndexRequest request) {
+        this(request.getAlias(), request.getEsId(), request.doRefresh());
+        this.setQuery(request.getQuery());
+    }
+
+}
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Search7Request.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Search7Request.java
new file mode 100644
index 0000000..9c4424f
--- /dev/null
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Search7Request.java
@@ -0,0 +1,46 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH 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.onap.ccsdk.features.sdnr.wt.common.database.requests;
+
+/**
+ * @author Michael Dürre
+ *
+ */
+public class Search7Request extends SearchRequest {
+
+    /**
+     * @param alias
+     * @param dataType
+     */
+    public Search7Request(String alias) {
+        super(String.format("/%s/_search", alias));
+    }
+
+    /**
+     * @param request
+     */
+    public Search7Request(SearchRequest request) {
+        this(request.getAlias());
+        this.setQuery(request.getQuery());
+    }
+
+}
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/SearchRequest.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/SearchRequest.java
index 113cb4e..f908894 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/SearchRequest.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/SearchRequest.java
@@ -25,8 +25,16 @@
 
 public class SearchRequest extends BaseRequest {
 
+    private final String alias;
+
+    public SearchRequest(String uri) {
+        super("POST", uri);
+        this.alias = null;
+    }
+
     public SearchRequest(String alias, String dataType) {
         super("POST", String.format("/%s/%s/_search", alias, dataType));
+        this.alias = alias;
     }
 
     @Override
@@ -34,4 +42,10 @@
         super.setQuery(query);
     }
 
+    public String getAlias() {
+        return this.alias;
+    }
+
+
+
 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Update7Request.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Update7Request.java
new file mode 100644
index 0000000..6cff933
--- /dev/null
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/Update7Request.java
@@ -0,0 +1,40 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH 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.onap.ccsdk.features.sdnr.wt.common.database.requests;
+
+/**
+ * @author Michael Dürre
+ *
+ *         https://github.com/elastic/elasticsearch/blob/7.1/rest-api-spec/src/main/resources/rest-api-spec/api/update.json
+ */
+public class Update7Request extends UpdateRequest {
+
+    public Update7Request(String alias, String esId, int retries, boolean refresh) {
+        super(String.format("/%s/_update/%s", alias, BaseRequest.urlEncodeValue(esId), retries), refresh);
+    }
+
+    public Update7Request(UpdateRequest request) {
+        this(request.getAlias(), request.getEsId(), request.getRetries(), request.doRefresh());
+        this.setQuery(request.getQuery());
+    }
+
+}
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/UpdateByQuery7Request.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/UpdateByQuery7Request.java
new file mode 100644
index 0000000..14a45be
--- /dev/null
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/requests/UpdateByQuery7Request.java
@@ -0,0 +1,39 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH 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.onap.ccsdk.features.sdnr.wt.common.database.requests;
+
+/**
+ * @author Michael Dürre
+ *
+ */
+public class UpdateByQuery7Request extends UpdateByQueryRequest {
+
+    public UpdateByQuery7Request(String alias, boolean refresh) {
+        super(alias, "_doc", refresh);
+    }
+
+    public UpdateByQuery7Request(UpdateByQueryRequest request) {
+        this(request.getAlias(), request.doRefresh());
+        this.setQuery(request.getQuery());
+    }
+
+}
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/BaseResponse.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/BaseResponse.java
index 2746be4..2791645 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/BaseResponse.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/BaseResponse.java
@@ -32,6 +32,7 @@
 import org.slf4j.LoggerFactory;
 
 public class BaseResponse {
+
     private static final Logger LOG = LoggerFactory.getLogger(BaseResponse.class);
 
     private final int responseCode;
@@ -45,14 +46,10 @@
     }
 
     public boolean isResponseSucceeded() {
-        return this.responseCode < 300;
+        return this.responseCode < 300 && this.responseCode >= 200;
     }
 
     JSONObject getJson(Response response) {
-        if (response == null) {
-            LOG.warn("unable to parse response. response is null.");
-            return null;
-        }
         try {
             String sresponse = EntityUtils.toString(response.getEntity());
             LOG.debug("parsing response={}", sresponse);
@@ -95,4 +92,6 @@
         }
 
     }
+
+
 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/DeleteResponse.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/DeleteResponse.java
index f6202d0..46ef1b9 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/DeleteResponse.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/DeleteResponse.java
@@ -35,8 +35,6 @@
             JSONObject o = this.getJson(response);
             if (o != null) {
                 this.isDeleted = "deleted".equals(o.getString("result"));
-            } else {
-                this.isDeleted = false;
             }
         } else {
             this.isDeleted = false;
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/SearchResponse.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/SearchResponse.java
index 6a7ed0d..88a14c6 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/SearchResponse.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/SearchResponse.java
@@ -45,7 +45,7 @@
     private void handleResult(JSONObject result) {
         if (result != null && this.isResponseSucceeded()) {
             JSONObject hitsouter = result.getJSONObject("hits");
-            this.total = hitsouter.getLong("total");
+            this.total = this.getTotalFromHits(hitsouter);
             JSONArray a = hitsouter.getJSONArray("hits");
             SearchHit[] hits = new SearchHit[a.length()];
             for (int i = 0; i < a.length(); i++) {
@@ -84,4 +84,18 @@
         }
         return entries;
     }
+
+    /**
+     * @param hits
+     * @return
+     */
+    private long getTotalFromHits(JSONObject hits) {
+        Object o = hits.get("total");
+        if (o instanceof Long || o instanceof Integer) {
+            return hits.getLong("total");
+        } else if (o instanceof JSONObject) {
+            return hits.getJSONObject("total").getLong("value");
+        }
+        return 0;
+    }
 }
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/UpdateResponse.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/UpdateResponse.java
index 80cb248..2c9fee6 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/UpdateResponse.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/responses/UpdateResponse.java
@@ -39,7 +39,7 @@
         super(response);
         JSONObject o = this.getJson(response);
 
-        this.result = o.getString("result");
+        this.result = o == null ? null : o.getString("result");
     }
 
     public boolean succeeded() {
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java
index fdba374..87a3765 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java
@@ -72,7 +72,7 @@
     private static final int DEFAULT_HTTP_TIMEOUT_MS = 30000; // in ms
 
     private final boolean trustAll;
-    private final String baseUrl;
+    private String baseUrl;
 
     private int timeout = DEFAULT_HTTP_TIMEOUT_MS;
     private SSLContext sc = null;
@@ -99,7 +99,15 @@
         }
     }
 
-    protected @Nonnull BaseHTTPResponse sendRequest(String uri, String method, String body, Map<String, String> headers)
+    public void setBaseUrl(String base) {
+        if (!base.endsWith("/")) {
+            base += "/";
+        }
+        this.baseUrl = base;
+    }
+
+    @Nonnull
+    protected BaseHTTPResponse sendRequest(String uri, String method, String body, Map<String, String> headers)
             throws IOException {
         return this.sendRequest(uri, method, body != null ? body.getBytes(CHARSET) : null, headers);
     }
diff --git a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestConfig.java b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestConfig.java
index 4156204..cbe0b9c 100644
--- a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestConfig.java
+++ b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestConfig.java
@@ -21,16 +21,16 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.common.test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.io.File;
 import java.io.IOException;
-import java.lang.reflect.Field;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.nio.file.Files;
-import java.util.Collections;
-import java.util.Map;
 
 import org.junit.After;
 import org.junit.Before;
@@ -249,17 +249,4 @@
         section.parseLines();
         assertTrue(section.getProperty(KEY).length() > " in ".length());
     }
-
-    public static void setEnv(String key, String value) {
-        try {
-            Map<String, String> env = System.getenv();
-            Class<?> cl = env.getClass();
-            Field field = cl.getDeclaredField("m");
-            field.setAccessible(true);
-            Map<String, String> writableEnv = (Map<String, String>) field.get(env);
-            writableEnv.put(key, value);
-        } catch (Exception e) {
-            throw new IllegalStateException("Failed to set environment variable", e);
-        }
-    }
 }
diff --git a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestDbClient.java b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestDbClient.java
index cf9d930..421a222 100644
--- a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestDbClient.java
+++ b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestDbClient.java
@@ -21,10 +21,12 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.common.test;
 
-import static org.junit.Assert.*;
-
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 import java.io.IOException;
-
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
@@ -47,7 +49,7 @@
     @BeforeClass
     public static void init() throws Exception {
 
-        dbClient = new HtDatabaseClient(hosts);
+        dbClient = HtDatabaseClient.getClient(hosts);
         dbClient.waitForYellowStatus(20000);
 
     }
diff --git a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestDbRequests.java b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestDbRequests.java
index 756d70c..492dfa9 100644
--- a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestDbRequests.java
+++ b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestDbRequests.java
@@ -21,6 +21,18 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.common.test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.Arrays;
+import java.util.List;
+import org.json.JSONException;
+import org.json.JSONObject;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -57,20 +69,6 @@
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.UpdateByQueryResponse;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.UpdateResponse;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import java.io.IOException;
-import java.text.ParseException;
-import java.util.Arrays;
-import java.util.List;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
 public class TestDbRequests {
 
     private static HtDatabaseClient dbClient;
@@ -80,7 +78,7 @@
     @BeforeClass
     public static void init() throws Exception {
 
-        dbClient = new HtDatabaseClient(hosts);
+        dbClient = HtDatabaseClient.getClient(hosts);
 
     }
 
@@ -200,7 +198,7 @@
         }
         this.insert(IDX, ID, JSON);
         // delete data
-        DeleteRequest request2 = new DeleteRequest(IDX, IDX, ID);
+        DeleteRequest request2 = new DeleteRequest(IDX, dbClient.isVersion7() ? "_doc" : IDX, ID);
         DeleteResponse response2 = null;
         try {
             response2 = dbClient.delete(request2);
@@ -215,7 +213,7 @@
             fail(e.getMessage());
         }
         // verify data deleted
-        GetRequest request4 = new GetRequest(IDX, IDX, ID);
+        GetRequest request4 = new GetRequest(IDX, dbClient.isVersion7() ? "_doc" : IDX, ID);
         GetResponse response4 = null;
         try {
             response4 = dbClient.get(request4);
@@ -233,8 +231,11 @@
      */
     private JSONObject defaultMappings(String idx, boolean useStrict) {
         String mapping = "{}";
-        return new JSONObject(String.format("{\"%s\":{%s\"properties\":%s}}", idx,
-                useStrict ? "\"dynamic\": false," : "\"dynamic\": true,", mapping));
+        return dbClient.isVersion7()
+                ? new JSONObject(String.format("{%s\"properties\":%s}",
+                        useStrict ? "\"dynamic\": false," : "\"dynamic\": true,", mapping))
+                : new JSONObject(String.format("{\"%s\":{%s\"properties\":%s}}", idx,
+                        useStrict ? "\"dynamic\": false," : "\"dynamic\": true,", mapping));
     }
 
     @Test
@@ -325,7 +326,7 @@
         this.insert(IDX, ID, JSON);
         this.insert(IDX, ID2, JSON2);
         this.insert(IDX, ID3, JSON3);
-        SearchRequest request = new SearchRequest(IDX, IDX);
+        SearchRequest request = new SearchRequest(IDX, dbClient.isVersion7() ? "_doc" : IDX);
         request.setQuery(QueryBuilders.matchAllQuery());
         SearchResponse response = null;
         try {
@@ -336,7 +337,7 @@
         assertNotNull(response);
         assertEquals("not all items found", 3, response.getHits().length);
         assertEquals("incorrect index", IDX, response.getHits()[0].getIndex());
-        assertEquals("incorrect type", IDX, response.getHits()[0].getType());
+        assertEquals("incorrect type", dbClient.isVersion7() ? "_doc" : IDX, response.getHits()[0].getType());
         this.deleteIndex(IDX);
     }
 
@@ -354,7 +355,7 @@
             fail("unable to create index");
         }
         this.insert(IDX, ID, JSON);
-        UpdateRequest request = new UpdateRequest(IDX, IDX, ID);
+        UpdateRequest request = new UpdateRequest(IDX, dbClient.isVersion7() ? "_doc" : IDX, ID);
         UpdateResponse response = null;
         try {
             request.source(new JSONObject(JSON2));
@@ -371,7 +372,7 @@
             fail(e.getMessage());
         }
         // verify update
-        GetRequest request3 = new GetRequest(IDX, IDX, ID);
+        GetRequest request3 = new GetRequest(IDX, dbClient.isVersion7() ? "_doc" : IDX, ID);
         GetResponse response3 = null;
         try {
             response3 = dbClient.get(request3);
@@ -397,7 +398,7 @@
             fail("unable to create index");
         }
         this.insert(IDX, ID, JSON);
-        UpdateByQueryRequest request = new UpdateByQueryRequest(IDX, IDX);
+        UpdateByQueryRequest request = new UpdateByQueryRequest(IDX, dbClient.isVersion7() ? "_doc" : IDX);
         UpdateByQueryResponse response = null;
         try {
             request.source(ID, new JSONObject(JSON2));
@@ -414,7 +415,7 @@
             fail(e.getMessage());
         }
         // verify update
-        GetRequest request3 = new GetRequest(IDX, IDX, ID);
+        GetRequest request3 = new GetRequest(IDX, dbClient.isVersion7() ? "_doc" : IDX, ID);
         GetResponse response3 = null;
         try {
             response3 = dbClient.get(request3);
@@ -434,9 +435,10 @@
         final String JSON3 = "{ \"node-id\":\"sim3\",\"severity\":\"minor\"}";
         final String JSON4 = "{ \"node-id\":\"sim4\",\"severity\":\"warning\"}";
         final String JSON5 = "{ \"node-id\":\"sim5\",\"severity\":\"major\"}";
-        final String MAPPINGS = String.format("{\"" + IDX + "\":{\"properties\":%s}}",
-                "{\"node-id\":{\"type\": \"keyword\"},\"severity\": {\"type\": \"keyword\"}}");
-        // create index with mapping keyword
+        final String MAPPINGS =
+                String.format(dbClient.isVersion7() ? "{\"properties\":%s}" : "{\"" + IDX + "\":{\"properties\":%s}}",
+                        "{\"node-id\":{\"type\": \"keyword\"},\"severity\": {\"type\": \"keyword\"}}");
+        //create index with mapping keyword
         CreateIndexResponse iresponse = null;
         try {
             if (!dbClient.isExistsIndex(IDX)) {
@@ -449,6 +451,7 @@
             fail("unable to create index: " + e1.getMessage());
         }
 
+
         // fill index
         this.insert(IDX, null, JSON);
         this.insert(IDX, null, JSON2);
@@ -462,7 +465,7 @@
             fail(e.getMessage());
         }
 
-        SearchRequest request = new SearchRequest(IDX, IDX);
+        SearchRequest request = new SearchRequest(IDX, dbClient.isVersion7() ? "_doc" : IDX);
         request.setQuery(QueryBuilders.matchAllQuery().aggregations("severity").size(0));
         SearchResponse response = null;
         try {
@@ -501,7 +504,7 @@
         System.out.println(stats.getNodeStatistics());
     }
 
-    // @Test
+    //@Test
     public void testPreventAutoCreateIndex() {
         final String IDX1 = "acidx1";
         final String ID1 = "acid1";
@@ -511,7 +514,7 @@
 
         ClusterSettingsResponse settingsResponse = null;
         String esId = null;
-        // set setting to allow autocreate
+        //set setting to allow autocreate
         try {
             settingsResponse = dbClient.setupClusterSettings(new ClusterSettingsRequest(true));
         } catch (IOException e) {
@@ -519,10 +522,10 @@
         }
         assertNotNull(settingsResponse);
         assertTrue(settingsResponse.isAcknowledged());
-        // test if something new can be created
+        //test if something new can be created
         esId = dbClient.doWriteRaw(IDX1, IDX1, ID1, OBJ);
         assertEquals(ID1, esId);
-        // set setting to deny autocreate
+        //set setting to deny autocreate
         try {
             settingsResponse = dbClient.setupClusterSettings(new ClusterSettingsRequest(false));
         } catch (IOException e) {
@@ -530,10 +533,10 @@
         }
         assertNotNull(settingsResponse);
         assertTrue(settingsResponse.isAcknowledged());
-        // test if something new cannot be created
+        //test if something new cannot be created
         esId = dbClient.doWriteRaw(IDX2, IDX2, ID2, OBJ);
         assertNull(esId);
-        // set setting to allow autocreate
+        //set setting to allow autocreate
         try {
             settingsResponse = dbClient.setupClusterSettings(new ClusterSettingsRequest(true));
         } catch (IOException e) {
@@ -560,4 +563,5 @@
         }
     }
 
+
 }
diff --git a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestPortstatus.java b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestPortstatus.java
index d073043..3ddbceb 100644
--- a/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestPortstatus.java
+++ b/sdnr/wt/common/src/test/java/org/onap/ccsdk/features/sdnr/wt/common/test/TestPortstatus.java
@@ -1,19 +1,22 @@
 /*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2019 highstreet technologies GmbH 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
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- * ============LICENSE_END==========================================================================
+ * 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.onap.ccsdk.features.sdnr.wt.common.test;
 
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java
index 08db034..76d47e3 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/ElasticSearchDataProvider.java
@@ -23,14 +23,12 @@
 
 import java.io.IOException;
 import java.util.concurrent.TimeUnit;
-
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
 import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.DataObjectAcessorPm.Intervall;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.HtDatabaseMaintenance;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMaintenanceOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerOutputBuilder;
@@ -110,7 +108,7 @@
         super();
         LOG.info("Start {}", this.getClass().getName());
 
-        this.dbClient = new HtDatabaseClient(hosts, authUsername, authPassword, trustAllCerts);
+        this.dbClient = HtDatabaseClient.getClient(hosts, authUsername, authPassword, trustAllCerts);
         this.mediatorserverRW = new DataObjectAcessor<>(dbClient, Entity.MediatorServer,
                 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Data.class);
         this.mediatorserverRW.setWriteInterface(MediatorServerEntity.class);
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/MediatorServerDataProvider.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/MediatorServerDataProvider.java
index 38e5b13..258104d 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/MediatorServerDataProvider.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/MediatorServerDataProvider.java
@@ -27,7 +27,6 @@
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
-
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
 import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
 import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo;
@@ -55,7 +54,7 @@
         super();
         LOG.info("Start {}", this.getClass().getName());
         this.entries = new HashMap<>();
-        this.dbClient = new HtDatabaseClient(hosts, authUsername, authPassword);
+        this.dbClient = HtDatabaseClient.getClient(hosts, authUsername, authPassword);
         this.mediatorserverRW = new DataObjectAcessor<>(dbClient, Entity.MediatorServer, Data.class);
         this.scheduler.scheduleAtFixedRate(onTick, this.REFRESH_INTERVAL, this.REFRESH_INTERVAL, TimeUnit.SECONDS);
     }
@@ -80,7 +79,7 @@
     }
 
     /**
-     * 
+     *
      * @param dbServerId
      * @return url or null if not exists
      */
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestCRUDforDatabase.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestCRUDforDatabase.java
index 0294c6e..5cf2f06 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestCRUDforDatabase.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestCRUDforDatabase.java
@@ -21,14 +21,17 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
 
-import static org.junit.Assert.*;
-
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 import java.io.IOException;
 import java.math.BigInteger;
 import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
-
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
@@ -56,7 +59,6 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteNetworkElementConnectionInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.DeleteNetworkElementConnectionInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.EntityInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Faultlog;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.FaultlogEntity;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.GranularityPeriodType;
@@ -112,7 +114,6 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateNetworkElementConnectionInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateNetworkElementConnectionInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.UpdateNetworkElementConnectionOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.Filter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.FilterBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.Pagination;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.entity.input.PaginationBuilder;
@@ -130,7 +131,7 @@
 
         dbProvider = new ElasticSearchDataProvider(hosts);
         dbProvider.waitForYellowDatabaseStatus(30, TimeUnit.SECONDS);
-        dbRawProvider = new HtDatabaseClient(hosts);
+        dbRawProvider = HtDatabaseClient.getClient(hosts);
     }
 
     public static void trySleep(long ms) {
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestConfig.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestConfig.java
index c0234bf..1275b03 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestConfig.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestConfig.java
@@ -21,12 +21,10 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
 
-import static org.junit.Assert.*;
-
+import static org.junit.Assert.assertEquals;
 import java.io.File;
 import java.lang.reflect.Field;
 import java.util.Map;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -40,6 +38,7 @@
     private static final Logger LOG = LoggerFactory.getLogger(TestConfig.class);
 
     private static final String TESTFILENAME = "testconfig.properties";
+    private static final String HOSTNAME = "localhost";
 
     @After
     @Before
@@ -53,18 +52,23 @@
 
     @Test
     public void test() {
+        int databasePort = setSDNRDBURLEnv();
+
         ConfigurationFileRepresentation configuration = new ConfigurationFileRepresentation(TESTFILENAME);
-        setSDNRDBURLEnv();
         EsConfig esConfig = new EsConfig(configuration);
         LOG.info("Defaultconfiguration: {}", esConfig.toString());
         assertEquals("http", esConfig.getHosts()[0].protocol.getValue());
-        assertEquals(9200, esConfig.getHosts()[0].port);
-        assertEquals("sdnrdb", esConfig.getHosts()[0].hostname);
+        assertEquals(databasePort, esConfig.getHosts()[0].port);
+        assertEquals(HOSTNAME, esConfig.getHosts()[0].hostname);
 
     }
 
-    public static void setSDNRDBURLEnv() {
-        setEnv("SDNRDBURL", "http://sdnrdb:9200");
+    public static int setSDNRDBURLEnv() {
+        int databasePort = Integer
+                .valueOf(System.getProperty("databaseport") != null ? System.getProperty("databaseport") : "49200");
+        System.out.println("DB Port: " + databasePort);
+        setEnv("SDNRDBURL", "http://"+HOSTNAME+":"+databasePort);
+        return databasePort;
     }
 
     public static void setEnv(String key, String value) {
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestDataMappings.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestDataMappings.java
index a4b284e..f63beee 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestDataMappings.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestDataMappings.java
@@ -22,122 +22,67 @@
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
 
 import java.io.IOException;
-import java.util.List;
 import org.junit.Test;
-import org.onap.ccsdk.features.sdnr.wt.common.database.DatabaseClient;
-import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
-import org.onap.ccsdk.features.sdnr.wt.common.database.SearchHit;
-import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
-import org.onap.ccsdk.features.sdnr.wt.common.database.config.HostInfo;
-import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
-import org.onap.ccsdk.features.sdnr.wt.common.database.responses.SearchResponse;
-import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.EsDataObjectReaderWriter;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapper;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data;
-import org.opendaylight.yangtools.yang.binding.DataObject;
 
 public class TestDataMappings {
 
-    private static final HostInfo[] HOSTINFOS = new HostInfo[] {HostInfo.getDefault()};
-    //public static final String ESDATATYPENAME = "faultcurrent";
-
-    private static class HtDatabaseClientHelper extends HtDatabaseClient {
-
-        private final String json;
-
-        public HtDatabaseClientHelper(String jsonResponse, HostInfo[] hosts) {
-            super(hosts);
-            this.json = jsonResponse;
-
-        }
-
-        @Override
-        public SearchResult<SearchHit> doReadByQueryJsonData(String dataTypeName, QueryBuilder qb) {
-            return new SearchResult<>(new SearchResponse(this.json).getHits());
-        }
-    }
-
-    private static class MapResult<T extends DataObject> {
-        public final List<T> mappedData;
-
-        public MapResult(String dataType, Class<T> cls, String dbJson) throws ClassNotFoundException {
-            System.out.println(dbJson);
-            DatabaseClient db = new HtDatabaseClientHelper(dbJson, HOSTINFOS);
-            EsDataObjectReaderWriter<T> dbrw = new EsDataObjectReaderWriter<>(db, dataType, cls);
-            this.mappedData = dbrw.doReadAll().getHits();
-        }
-    }
-
-    private static final String SEARCHJSON_FORMAT = "{\n" + "\"took\": 0,\n" + "\"timed_out\": false,\n"
-            + "\"_shards\": {\n" + "\"total\": 5,\n" + "\"successful\": 5,\n" + "\"skipped\": 0,\n" + "\"failed\": 0\n"
-            + "},\n" + "\"hits\": {\n" + "\"total\": 1,\n" + "\"max_score\": 1,\n" + "\"hits\": [\n" + "{\n"
-            + "\"_index\": \"%s\",\n" + "\"_type\": \"%s\",\n" + "\"_id\": \"%s\",\n" + "\"_score\": 1,\n"
-            + "\"_source\": %s}\n" + "]\n" + "}\n" + "}";
-
-    private static final String MEDIATORSERVER_DB_ID = "LumwSG0BFvcE3yf8MBM5";
-    private static final String MEDIATOR_SERVERDB_JSON =
-            "{\"url\":\"https://10.45.44.223:7590\",\"name\":\"test mediator server\"}";
-
-    private static final String FAULTCURRENT_DB_ID = "LumwSG0BFvcE3yf8MBM5";
-    private static final String FAULTCURRENT_DB_NODEID = "sim1";
-    private static final int FAULTCURRENT_DB_COUNTER = 3;
-    private static final String FAULTCURRENT_DB_OBJECTID = "LPS-MWT-01";
-    private static final String FAULTCURRENT_DB_PROBLEM = "rlsExceeded";
-    private static final String FAULTCURRENT_DB_SEVERITY = "critical";
-    private static final DateAndTime FAULTCURRENT_DB_TIMESTAMP =
-            DateAndTime.getDefaultInstance("2019-09-18T13:07:05.8Z");
-
-    private static final String FAULTCURRENT_SERVERDB_JSON = "{\"node-id\":\"" + FAULTCURRENT_DB_NODEID + "\","
-            + "\"counter\":" + FAULTCURRENT_DB_COUNTER + "," + "\"object-id\":\"" + FAULTCURRENT_DB_OBJECTID + "\","
-            + "\"problem\":\"" + FAULTCURRENT_DB_PROBLEM + "\"," + "\"timestamp\":\""
-            + FAULTCURRENT_DB_TIMESTAMP.getValue() + "\"," + "\"severity\":\"" + FAULTCURRENT_DB_SEVERITY + "\"" + "}";
-
-
-    private static final String PMDATA15M_SERVERDB_JSON = "{\n" + "\"node-name\": \"sim2\",\n"
-            + "\"uuid-interface\": \"LP-MWPS-TTP-01\",\n" + "\"layer-protocol-name\": \"MWPS\",\n"
-            + "\"radio-signal-id\": \"Test11\",\n" + "\"time-stamp\": \"2017-07-04T14:00:00.0Z\",\n"
-            + "\"granularity-period\": \"PERIOD_15MIN\",\n" + "\"scanner-id\": \"PM_RADIO_15M_9\",\n"
-            + "\"performance-data\": {\n" + "\"es\": 0,\n" + "\"rx-level-avg\": -41,\n" + "\"time2-states\": -1,\n"
-            + "\"time4-states-s\": 0,\n" + "\"time4-states\": 0,\n" + "\"time8-states\": 0,\n"
-            + "\"time16-states-s\": -1,\n" + "\"time16-states\": 0,\n" + "\"time32-states\": 0,\n"
-            + "\"time64-states\": 0,\n" + "\"time128-states\": 0,\n" + "\"time256-states\": 900,\n"
-            + "\"time512-states\": -1,\n" + "\"time512-states-l\": -1,\n" + "\"time1024-states\": -1,\n"
-            + "\"time1024-states-l\": -1,\n" + "\"time2048-states\": -1,\n" + "\"time2048-states-l\": -1,\n"
-            + "\"time4096-states\": -1,\n" + "\"time4096-states-l\": -1,\n" + "\"time8192-states\": -1,\n"
-            + "\"time8192-states-l\": -1,\n" + "\"snir-min\": -99,\n" + "\"snir-max\": -99,\n" + "\"snir-avg\": -99,\n"
-            + "\"xpd-min\": -99,\n" + "\"xpd-max\": -99,\n" + "\"xpd-avg\": -99,\n" + "\"rf-temp-min\": -99,\n"
-            + "\"rf-temp-max\": -99,\n" + "\"rf-temp-avg\": -99,\n" + "\"defect-blocks-sum\": -1,\n"
-            + "\"time-period\": 900,\n" + "\"tx-level-min\": 25,\n" + "\"tx-level-max\": 25,\n"
-            + "\"tx-level-avg\": 25,\n" + "\"rx-level-min\": -41,\n" + "\"rx-level-max\": -41,\n"
-            + "\"unavailability\": 0,\n" + "\"ses\": 0,\n" + "\"cses\": 0\n" + "},\n"
-            + "\"suspect-interval-flag\": false\n" + "}";
-
-    //@Test
-    //	public void testMediatorServer() throws ClassNotFoundException {
-    //
-    //		MapResult<EsMediatorServer> result = new MapResult<EsMediatorServer>(EsMediatorServer.ESDATATYPENAME,
-    //				EsMediatorServer.class,
-    //				getSearchJson(EsMediatorServer.ESDATATYPENAME,MEDIATORSERVER_DB_ID,MEDIATOR_SERVERDB_JSON));
-    //		assertEquals("test mediator server", result.mappedData.get(0).getName());
-    //		assertEquals("https://10.45.44.223:7590", result.mappedData.get(0).getUrl());
-    //		assertEquals(MEDIATORSERVER_DB_ID, result.mappedData.get(0).getId());
-    //
-    //	}
-    //@Test
-    //	public void testFaultCurrent() {
-    //
-    //		MapResult<FaultcurrentEntity> result = new MapResult<FaultcurrentEntity>(ESDATATYPENAME, EsFaultCurrent.class,
-    //				getSearchJson(ESDATATYPENAME, FAULTCURRENT_DB_ID, FAULTCURRENT_SERVERDB_JSON));
-    //		assertEquals(FAULTCURRENT_DB_ID, result.mappedData.get(0).getId());
-    //		assertEquals(FAULTCURRENT_DB_NODEID, result.mappedData.get(0).getNodeId());
-    //		assertEquals(FAULTCURRENT_DB_COUNTER, result.mappedData.get(0).getCounter().intValue());
-    //		assertEquals(FAULTCURRENT_DB_OBJECTID, result.mappedData.get(0).getObjectId());
-    //		assertEquals(FAULTCURRENT_DB_PROBLEM, result.mappedData.get(0).getProblem());
-    //		assertEquals(FAULTCURRENT_DB_SEVERITY, result.mappedData.get(0).getSeverity());
-    //		assertEquals(FAULTCURRENT_DB_TIMESTAMP, result.mappedData.get(0).getTimestamp());
-    //	}
-    //
+    // @formatter:off
+    private static final String PMDATA15M_SERVERDB_JSON = "{\n"
+            + "\"node-name\": \"sim2\",\n"
+            + "\"uuid-interface\": \"LP-MWPS-TTP-01\",\n"
+            + "\"layer-protocol-name\": \"MWPS\",\n"
+            + "\"radio-signal-id\": \"Test11\",\n"
+            + "\"time-stamp\": \"2017-07-04T14:00:00.0Z\",\n"
+            + "\"granularity-period\": \"PERIOD_15MIN\",\n"
+            + "\"scanner-id\": \"PM_RADIO_15M_9\",\n"
+            + "\"performance-data\": {\n"
+            + "\"es\": 0,\n"
+            + "\"rx-level-avg\": -41,\n"
+            + "\"time2-states\": -1,\n"
+            + "\"time4-states-s\": 0,\n"
+            + "\"time4-states\": 0,\n"
+            + "\"time8-states\": 0,\n"
+            + "\"time16-states-s\": -1,\n"
+            + "\"time16-states\": 0,\n"
+            + "\"time32-states\": 0,\n"
+            + "\"time64-states\": 0,\n"
+            + "\"time128-states\": 0,\n"
+            + "\"time256-states\": 900,\n"
+            + "\"time512-states\": -1,\n"
+            + "\"time512-states-l\": -1,\n"
+            + "\"time1024-states\": -1,\n"
+            + "\"time1024-states-l\": -1,\n"
+            + "\"time2048-states\": -1,\n"
+            + "\"time2048-states-l\": -1,\n"
+            + "\"time4096-states\": -1,\n"
+            + "\"time4096-states-l\": -1,\n"
+            + "\"time8192-states\": -1,\n"
+            + "\"time8192-states-l\": -1,\n"
+            + "\"snir-min\": -99,\n"
+            + "\"snir-max\": -99,\n"
+            + "\"snir-avg\": -99,\n"
+            + "\"xpd-min\": -99,\n"
+            + "\"xpd-max\": -99,\n"
+            + "\"xpd-avg\": -99,\n"
+            + "\"rf-temp-min\": -99,\n"
+            + "\"rf-temp-max\": -99,\n"
+            + "\"rf-temp-avg\": -99,\n"
+            + "\"defect-blocks-sum\": -1,\n"
+            + "\"time-period\": 900,\n"
+            + "\"tx-level-min\": 25,\n"
+            + "\"tx-level-max\": 25,\n"
+            + "\"tx-level-avg\": 25,\n"
+            + "\"rx-level-min\": -41,\n"
+            + "\"rx-level-max\": -41,\n"
+            + "\"unavailability\": 0,\n"
+            + "\"ses\": 0,\n"
+            + "\"cses\": 0\n"
+            + "},\n"
+            + "\"suspect-interval-flag\": false\n"
+            + "}";
+ // @formatter:on
     @Test
     public void testPmData15m() {
 
@@ -148,12 +93,6 @@
         } catch (IOException e) {
             e.printStackTrace();
         }
-
-
-    }
-
-    private String getSearchJson(String dataType, String dbId, String source) {
-        return String.format(SEARCHJSON_FORMAT, dataType, dataType, dbId, source);
     }
 
 }
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestEventService.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestEventService.java
index 308bbf6..6d54016 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestEventService.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestEventService.java
@@ -24,22 +24,18 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
-
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
 import org.onap.ccsdk.features.sdnr.wt.common.database.SearchHit;
 import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
-import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilder;
 import org.onap.ccsdk.features.sdnr.wt.common.database.queries.QueryBuilders;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.DeleteByQueryRequest;
-import org.onap.ccsdk.features.sdnr.wt.common.database.requests.SearchRequest;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.ElasticSearchDataProvider;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.HtDatabaseEventsService;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.NetconfTimeStampImpl;
@@ -84,7 +80,7 @@
 
         dbProvider = new ElasticSearchDataProvider(TestCRUDforDatabase.hosts);
         dbProvider.waitForYellowDatabaseStatus(30, TimeUnit.SECONDS);
-        dbRawProvider = new HtDatabaseClient(TestCRUDforDatabase.hosts);
+        dbRawProvider = HtDatabaseClient.getClient(TestCRUDforDatabase.hosts);
 
         try {
             service = new HtDatabaseEventsService(dbRawProvider, dbProvider);
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestMaintenanceServiceData.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestMaintenanceServiceData.java
index 6c22b0e..5839738 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestMaintenanceServiceData.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestMaintenanceServiceData.java
@@ -21,12 +21,12 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
 
-import static org.junit.Assert.*;
-
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import java.io.IOException;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
-
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
@@ -55,7 +55,7 @@
 
         dbProvider = new ElasticSearchDataProvider(TestCRUDforDatabase.hosts);
         dbProvider.waitForYellowDatabaseStatus(30, TimeUnit.SECONDS);
-        dbRawProvider = new HtDatabaseClient(TestCRUDforDatabase.hosts);
+        dbRawProvider = HtDatabaseClient.getClient(TestCRUDforDatabase.hosts);
         service = dbProvider.getHtDatabaseMaintenance();
     }
 
@@ -91,7 +91,7 @@
 
     /**
      * Delete
-     * 
+     *
      * @param entity
      */
     private static void clearDbEntity(Entity entity) {
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestMediatorServerService.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestMediatorServerService.java
index edd0f9e..83f8de8 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestMediatorServerService.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestMediatorServerService.java
@@ -24,10 +24,8 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.fail;
-
 import java.io.IOException;
 import java.util.concurrent.TimeUnit;
-
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
@@ -35,7 +33,6 @@
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.DeleteByQueryRequest;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.ElasticSearchDataProvider;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.MediatorServerDataProvider;
-import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.HtDatabaseMaintenance;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.CreateMediatorServerOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.Entity;
@@ -56,7 +53,7 @@
 
         dbProvider = new ElasticSearchDataProvider(TestCRUDforDatabase.hosts);
         dbProvider.waitForYellowDatabaseStatus(30, TimeUnit.SECONDS);
-        dbRawProvider = new HtDatabaseClient(TestCRUDforDatabase.hosts);
+        dbRawProvider = HtDatabaseClient.getClient(TestCRUDforDatabase.hosts);
         service = new MediatorServerDataProvider(TestCRUDforDatabase.hosts);
 
 
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangGenSalMapping.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangGenSalMapping.java
index 4a08342..585f7de 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangGenSalMapping.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangGenSalMapping.java
@@ -25,7 +25,6 @@
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.List;
-
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.json.JSONObject;
@@ -68,6 +67,13 @@
     // Create mapper for serialization and deserialization
     YangToolsMapper mapper = new YangToolsMapper();
 
+    private static HostInfo[] getHostinfo() {
+        int databasePort = Integer
+                .valueOf(System.getProperty("databaseport") != null ? System.getProperty("databaseport") : "49200");
+        System.out.println("DB Port: " + databasePort);
+        return new HostInfo[] {new HostInfo("localhost", databasePort, Protocol.HTTP)};
+    }
+
     @Test
     public void test1() throws IOException {
 
@@ -80,10 +86,9 @@
         loginPasswordBuilder.setPassword("myTestPassword");
         netconfNodeBuilder.setCredentials(loginPasswordBuilder.build());
 
-        OdlHelloMessageCapabilitiesBuilder odlHelloMessageCapabilitiesBuilder =
-                new OdlHelloMessageCapabilitiesBuilder();
+        OdlHelloMessageCapabilitiesBuilder odlHelloMessageCapabilitiesBuilder = new OdlHelloMessageCapabilitiesBuilder();
         List<Uri> uriList = new ArrayList<>();
-        uriList.add(new Uri("test.uri"));
+        uriList.add( new Uri("test.uri") );
         odlHelloMessageCapabilitiesBuilder.setCapability(uriList);
         netconfNodeBuilder.setOdlHelloMessageCapabilities(odlHelloMessageCapabilitiesBuilder.build());
 
@@ -99,7 +104,7 @@
         NetconfNode generatedNode = mapper.readValue(res.getBytes(), NetconfNode.class);
         out(generatedNode.toString()); // Print it with specified indentation
         // Compare result
-        out("Equal?  " + netconfNode.equals(generatedNode));
+        out("Equal?  "+netconfNode.equals(generatedNode));
     }
 
     static class TestDataObjectBuilder implements Builder<TestDataObject> {
@@ -119,22 +124,20 @@
     }
 
     @Test
-    public void test2() throws ClassNotFoundException {
+    public void test2() throws Exception    {
 
-        int databasePort = Integer
-                .valueOf(System.getProperty("databaseport") != null ? System.getProperty("databaseport") : "49200");
-        System.out.println("DB Port: " + databasePort);
+        int databasePort = Integer.valueOf(System.getProperty("databaseport")!=null?System.getProperty("databaseport"):"49200");
+        System.out.println("DB Port: "+databasePort);
 
-        HostInfo[] HOSTINFOS = new HostInfo[] {new HostInfo("localhost", databasePort, Protocol.HTTP)};
-        DatabaseClient db = new HtDatabaseClient(HOSTINFOS);
+        HostInfo[] HOSTINFOS = new HostInfo[] { new HostInfo("localhost", databasePort ,Protocol.HTTP)};
+        DatabaseClient db = HtDatabaseClient.getClient(HOSTINFOS);
 
         EsDataObjectReaderWriter<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data> dataRW =
-                new EsDataObjectReaderWriter<>(db, "inventorytest",
-                        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data.class);
+            new EsDataObjectReaderWriter<>(db, "inventorytest", org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data.class);
 
         org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data d1;
         d1 = getInventoryDataBuilder("MyDescription", 23L).build();
-        String id = dataRW.write(d1, null);
+        String id = dataRW.write(d1,null);
 
         org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.Data d2;
         d2 = dataRW.read(id);
@@ -144,7 +147,7 @@
     }
 
     @Test
-    public void test3() throws IOException {
+    public void test3() throws IOException    {
 
         PerformanceDataBuilder performanceBuilder = new PerformanceDataBuilder();
         performanceBuilder.setEs(99);
@@ -193,29 +196,59 @@
 
     @Test
     public void test5() throws IOException {
-        String jsonString = "{\n" + "    \"time-stamp\": \"2017-03-01T06:45:00.0Z\",\n"
-                + "    \"node-name\": \"Sim2230\",\n" + "    \"uuid-interface\": \"LP-MWPS-TTP-RADIO\",\n"
-                + "    \"scanner-id\": \"PM_RADIO_15M_14\",\n" + "    \"layer-protocol-name\": \"MWPS\",\n"
-                + "    \"granularity-period\": \"Period15Min\",\n" + "    \"radio-signal-id\": \"Test8\",\n"
-                + "    \"suspect-interval-flag\": false,\n" + "    \"performance-data\": {\n"
-                + "        \"time4096-states-l\": -1,\n" + "        \"time16-states-s\": -1,\n"
-                + "        \"tx-level-max\": 3,\n" + "        \"snir-max\": -99,\n" + "        \"time16-states\": 0,\n"
-                + "        \"time64-states\": 900,\n" + "        \"unavailability\": 0,\n"
-                + "        \"time8192-states-l\": -1,\n" + "        \"time512-states\": -1,\n"
-                + "        \"xpd-min\": -99,\n" + "        \"xpd-avg\": -99,\n" + "        \"tx-level-avg\": 3,\n"
-                + "        \"tx-level-min\": 3,\n" + "        \"rf-temp-min\": -99,\n"
-                + "        \"rf-temp-avg\": -99,\n" + "        \"snir-avg\": -99,\n" + "        \"snir-min\": -99,\n"
-                + "        \"time-period\": 900,\n" + "        \"time2-states\": 0,\n"
-                + "        \"time4-states\": 0,\n" + "        \"time8-states\": -1,\n" + "        \"ses\": 0,\n"
-                + "        \"time2048-states-l\": -1,\n" + "        \"time2048-states\": -1,\n"
-                + "        \"xpd-max\": -99,\n" + "        \"rf-temp-max\": -99,\n"
-                + "        \"time8192-states\": -1,\n" + "        \"time128-states\": -1,\n"
-                + "        \"time256-states\": -1,\n" + "        \"rx-level-min\": -44,\n"
-                + "        \"rx-level-avg\": -44,\n" + "        \"time1024-states-l\": -1,\n" + "        \"es\": 0,\n"
-                + "        \"cses\": 0,\n" + "        \"time4-states-s\": 0,\n" + "        \"time1024-states\": -1,\n"
-                + "        \"time512-states-l\": -1,\n" + "        \"time4096-states\": -1,\n"
-                + "        \"rx-level-max\": -45,\n" + "        \"defect-blocks-sum\": -1,\n"
-                + "        \"time32-states\": -1\n" + "    }\n" + "}";
+        String jsonString = "{\n" +
+                "    \"time-stamp\": \"2017-03-01T06:45:00.0Z\",\n" +
+                "    \"node-name\": \"Sim2230\",\n" +
+                "    \"uuid-interface\": \"LP-MWPS-TTP-RADIO\",\n" +
+                "    \"scanner-id\": \"PM_RADIO_15M_14\",\n" +
+                "    \"layer-protocol-name\": \"MWPS\",\n" +
+                "    \"granularity-period\": \"Period15Min\",\n" +
+                "    \"radio-signal-id\": \"Test8\",\n" +
+                "    \"suspect-interval-flag\": false,\n" +
+                "    \"performance-data\": {\n" +
+                "        \"time4096-states-l\": -1,\n" +
+                "        \"time16-states-s\": -1,\n" +
+                "        \"tx-level-max\": 3,\n" +
+                "        \"snir-max\": -99,\n" +
+                "        \"time16-states\": 0,\n" +
+                "        \"time64-states\": 900,\n" +
+                "        \"unavailability\": 0,\n" +
+                "        \"time8192-states-l\": -1,\n" +
+                "        \"time512-states\": -1,\n" +
+                "        \"xpd-min\": -99,\n" +
+                "        \"xpd-avg\": -99,\n" +
+                "        \"tx-level-avg\": 3,\n" +
+                "        \"tx-level-min\": 3,\n" +
+                "        \"rf-temp-min\": -99,\n" +
+                "        \"rf-temp-avg\": -99,\n" +
+                "        \"snir-avg\": -99,\n" +
+                "        \"snir-min\": -99,\n" +
+                "        \"time-period\": 900,\n" +
+                "        \"time2-states\": 0,\n" +
+                "        \"time4-states\": 0,\n" +
+                "        \"time8-states\": -1,\n" +
+                "        \"ses\": 0,\n" +
+                "        \"time2048-states-l\": -1,\n" +
+                "        \"time2048-states\": -1,\n" +
+                "        \"xpd-max\": -99,\n" +
+                "        \"rf-temp-max\": -99,\n" +
+                "        \"time8192-states\": -1,\n" +
+                "        \"time128-states\": -1,\n" +
+                "        \"time256-states\": -1,\n" +
+                "        \"rx-level-min\": -44,\n" +
+                "        \"rx-level-avg\": -44,\n" +
+                "        \"time1024-states-l\": -1,\n" +
+                "        \"es\": 0,\n" +
+                "        \"cses\": 0,\n" +
+                "        \"time4-states-s\": 0,\n" +
+                "        \"time1024-states\": -1,\n" +
+                "        \"time512-states-l\": -1,\n" +
+                "        \"time4096-states\": -1,\n" +
+                "        \"rx-level-max\": -45,\n" +
+                "        \"defect-blocks-sum\": -1,\n" +
+                "        \"time32-states\": -1\n" +
+                "    }\n" +
+                "}";
 
         // Map to JSON String to Object
         Data generatedNode = mapper.readValue(jsonString.getBytes(), Data.class);
@@ -225,14 +258,13 @@
 
 
     @Test
-    public void test6() throws IOException, ClassNotFoundException {
+    public void test6() throws Exception {
         out(method());
-        HtDatabaseClient dbClient = new HtDatabaseClient(new HostInfo[] {new HostInfo("sdnrdb", 9200, Protocol.HTTP)});
+        HtDatabaseClient dbClient = HtDatabaseClient.getClient(getHostinfo());
         String PMDATA15M_TYPE = "historicalperformance15min";
 
         EsDataObjectReaderWriter<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data> pm15mRW =
-                new EsDataObjectReaderWriter<>(dbClient, PMDATA15M_TYPE,
-                        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data.class);
+                new EsDataObjectReaderWriter<>(dbClient, PMDATA15M_TYPE, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data.class);
         pm15mRW.setEsIdAttributeName("_nodeName");
 
         ReadPmdata15mListInputBuilder inputBuilder = new ReadPmdata15mListInputBuilder();
@@ -251,36 +283,34 @@
         QueryBuilder query = fromFilter(input.getFilter()).from((page - 1) * pageSize).size(pageSize);
         setSortOrder(query, input.getSortorder());
 
-        SearchResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data> result =
-                pm15mRW.doReadAll(query);
+        SearchResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Data> result=pm15mRW.doReadAll(query);
 
-        out("Found: " + result.getHits().size());
-        int t = 0;
+        out("Found: "+result.getHits().size());
+        int t=0;
         for (Data hit : result.getHits()) {
-            out("Hit " + t++ + ":" + hit);
+            out("Hit "+t+++":"+hit);
         }
         setPagination(outputBuilder, page, pageSize, result.getTotal());
         outputBuilder.setData(result.getHits());
     }
 
     @Test
-    public void test7() throws IOException, ClassNotFoundException {
+    public void test7() throws Exception {
         out(method());
         String ESDATATYPE_MEDIATORSERVER = Entity.MediatorServer.getName();
-        HtDatabaseClient dbClient = new HtDatabaseClient(new HostInfo[] {new HostInfo("sdnrdb", 9200, Protocol.HTTP)});
+        HtDatabaseClient dbClient = HtDatabaseClient.getClient(getHostinfo());
         EsDataObjectReaderWriter<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Data> mediatorserverRW;
 
         mediatorserverRW = new EsDataObjectReaderWriter<>(dbClient, ESDATATYPE_MEDIATORSERVER,
                 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.mediator.server.list.output.Data.class)
-                        .setWriteInterface(
-                                org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.MediatorServerEntity.class)
-                        .setEsIdAttributeName("_id");
+                .setWriteInterface(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.MediatorServerEntity.class)
+                .setEsIdAttributeName("_id");
 
         CreateMediatorServerInputBuilder inputBuilder = new CreateMediatorServerInputBuilder();
         inputBuilder.setName("Hans");
         inputBuilder.setUrl("MyGreatUrl");
 
-        String id = mediatorserverRW.write(inputBuilder.build(), "testid");
+        String id = mediatorserverRW.write(inputBuilder.build(),"testid");
         System.out.println(id);
 
     }
@@ -290,15 +320,15 @@
         out(method());
         String input;
         input = "id-dd-dd";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to "+YangToolsMapper.toCamelCaseAttributeName(input));
         input = "idDdGg";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to "+YangToolsMapper.toCamelCaseAttributeName(input));
         input = "_idDdGg";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to "+YangToolsMapper.toCamelCaseAttributeName(input));
         input = "--ff--gfg";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to "+YangToolsMapper.toCamelCaseAttributeName(input));
         input = "";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to "+YangToolsMapper.toCamelCaseAttributeName(input));
     }
 
     /* ---------------------------------
@@ -309,8 +339,7 @@
         return nameofCurrMethod;
     }
 
-    private org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.DataBuilder getInventoryDataBuilder(
-            String description, long treeLevel) {
+    private org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.DataBuilder getInventoryDataBuilder(String description, long treeLevel) {
         org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.DataBuilder dataBuilder =
                 new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.inventory.list.output.DataBuilder();
         dataBuilder.setDescription(description);
@@ -348,9 +377,10 @@
         if (filters == null || filters.size() == 0) {
             return QueryBuilders.matchAllQuery();
 
-        } else if (filters.size() == 1) {
+        } else if(filters.size()==1){
             return QueryBuilders.matchQuery(filters.get(0).getProperty(), filters.get(0).getFiltervalue());
-        } else {
+        }
+        else {
             BoolQueryBuilder query = new BoolQueryBuilder();
             for (Filter fi : filters) {
                 query.must(QueryBuilders.matchQuery((prefix != null ? prefix : "") + fi.getProperty(),
@@ -360,7 +390,6 @@
         }
 
     }
-
     private static QueryBuilder setSortOrder(QueryBuilder query, @Nullable List<Sortorder> sortorder) {
         return setSortOrder(query, sortorder, "");
     }
@@ -378,12 +407,9 @@
 
     }
 
-    private static void setPagination(ReadPmdata15mListOutputBuilder outputBuilder, long page, long pageSize,
-            long totalSize) {
-        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Pagination value =
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.PaginationBuilder()
-                        .setPage(BigInteger.valueOf(page)).setSize(pageSize).setTotal(BigInteger.valueOf(totalSize))
-                        .build();
+    private static void setPagination(ReadPmdata15mListOutputBuilder outputBuilder, long page, long pageSize, long totalSize) {
+        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.Pagination value = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.read.pmdata._15m.list.output.PaginationBuilder()
+                .setPage(BigInteger.valueOf(page)).setSize(pageSize).setTotal(BigInteger.valueOf(totalSize)).build();
         outputBuilder.setPagination(value);
     }
 
diff --git a/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java b/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java
index 821e3ec..dabe004 100644
--- a/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java
+++ b/sdnr/wt/data-provider/setup/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/setup/DataMigrationProviderImpl.java
@@ -31,7 +31,6 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
-
 import org.json.JSONObject;
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
 import org.onap.ccsdk.features.sdnr.wt.common.database.Portstatus;
@@ -53,8 +52,8 @@
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.ListIndicesResponse;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.ComponentData;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.ComponentName;
-import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.DataMigrationReport;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.DataContainer;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.DataMigrationReport;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.Release;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.setup.data.SearchHitConverter;
 import org.slf4j.Logger;
@@ -72,7 +71,11 @@
         if (timeoutms > 0) {
             Portstatus.waitSecondsTillAvailable(timeoutms / 1000, hosts);
         }
-        this.dbClient = new HtDatabaseClient(hosts, username, password, trustAll);
+        try {
+            this.dbClient = HtDatabaseClient.getClient(hosts, username, password, trustAll);
+        } catch (Exception e) {
+            throw new IllegalArgumentException("Can not reach database with parameters.",e);
+        }
     }
 
     @Override
