diff --git a/sdnr/wt/data-provider/provider/java.sh b/sdnr/wt/data-provider/provider/java.sh
new file mode 100755
index 0000000..26d5aea
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/java.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Java startup helper
+# if JAVA_HOME is specified, use related version
+
+echo "Java run helper"
+
+if [ ! -z "$JAVA_HOME" ] ; then
+  echo "JAVA_HOME=$JAVA_HOME"
+  $JAVA_HOME/bin/java "$@"
+else
+  echo "Java on path"
+  java "$@"
+fi
+
diff --git a/sdnr/wt/data-provider/provider/pom.xml b/sdnr/wt/data-provider/provider/pom.xml
index cb40f71..8e56b70 100644
--- a/sdnr/wt/data-provider/provider/pom.xml
+++ b/sdnr/wt/data-provider/provider/pom.xml
@@ -29,11 +29,11 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>2.1.0</version>
+        <version>2.1.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
-    <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+    <groupId>org.onap.ccsdk.features.sdnr.wt.aluminium.sr1</groupId>
     <artifactId>sdnr-wt-data-provider-provider</artifactId>
     <version>1.1.1-SNAPSHOT</version>
     <packaging>bundle</packaging>
@@ -79,24 +79,31 @@
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
+            <artifactId>javax.servlet-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
             <scope>provided</scope>
         </dependency>
-
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.apache.karaf.shell</groupId>
             <artifactId>org.apache.karaf.shell.core</artifactId>
             <scope>provided</scope>
         </dependency>
-        <!--          <dependency> -->
-        <!--             <groupId>org.apache.karaf.bundle</groupId> -->
-        <!--             <artifactId>org.apache.karaf.bundle.core</artifactId> -->
-        <!--             <scope>provided</scope> -->
-        <!--         </dependency> -->
+<!--          <dependency> -->
+<!--             <groupId>org.apache.karaf.bundle</groupId> -->
+<!--             <artifactId>org.apache.karaf.bundle.core</artifactId> -->
+<!--             <scope>provided</scope> -->
+<!--         </dependency> -->
         <dependency>
             <groupId>org.opendaylight.netconf</groupId>
             <artifactId>sal-netconf-connector</artifactId>
@@ -149,7 +156,7 @@
                             <goal>exec</goal>
                         </goals>
                         <configuration>
-                            <executable>java</executable>
+                            <executable>${basedir}/java.sh</executable>
                             <arguments>
                                 <argument>-jar</argument>
                                 <argument>${basedir}/../../data-provider/setup/target/sdnr-dmt.jar</argument>
diff --git a/sdnr/wt/data-provider/provider/simplelogger.properties b/sdnr/wt/data-provider/provider/simplelogger.properties
new file mode 100644
index 0000000..f29f44e
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/simplelogger.properties
@@ -0,0 +1,34 @@
+# SLF4J's SimpleLogger configuration file
+# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
+
+# Default logging detail level for all instances of SimpleLogger.
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, defaults to "info".
+#org.slf4j.simpleLogger.defaultLogLevel=info
+
+# Logging detail level for a SimpleLogger instance named "xxxxx".
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, the default logging detail level is used.
+#org.slf4j.simpleLogger.log.xxxxx=
+
+# Set to true if you want the current date and time to be included in output messages.
+# Default is false, and will output the number of milliseconds elapsed since startup.
+#org.slf4j.simpleLogger.showDateTime=false
+
+# The date and time format to be used in the output messages.
+# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
+# If the format is not specified or is invalid, the default format is used.
+# The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
+org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
+
+# Set to true if you want to output the current thread name.
+# Defaults to true.
+org.slf4j.simpleLogger.showThreadName=true
+
+# Set to true if you want the Logger instance name to be included in output messages.
+# Defaults to true.
+org.slf4j.simpleLogger.showLogName=true
+
+# Set to true if you want the last component of the name to be included in output messages.
+# Defaults to false.
+org.slf4j.simpleLogger.showShortLogName=false
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 7a30542..0a966ae 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
@@ -47,6 +47,7 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.DeleteNetworkElementConnectionOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Entity;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EntityInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Guicutthrough;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.MaintenanceEntity;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.MediatorServerEntity;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementConnectionEntity;
@@ -55,6 +56,7 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadEventlogListOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadFaultcurrentListOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadFaultlogListOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadGuiCutThroughEntryOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadInventoryListOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadMaintenanceListOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadMediatorServerListOutputBuilder;
@@ -72,13 +74,10 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.UpdateMediatorServerOutputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.UpdateNetworkElementConnectionInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.UpdateNetworkElementConnectionOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Guicutthrough;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadGuiCutThroughEntryInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadGuiCutThroughEntryOutputBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class ElasticSearchDataProvider /*extends BaseStatusProvider /* implements IEntityDataProvider*/ {
+public class ElasticSearchDataProvider {
 
     private static final Logger LOG = LoggerFactory.getLogger(ElasticSearchDataProvider.class);
 
@@ -165,9 +164,6 @@
      * Provide access to model API
      */
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.faultcurrent.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.faultcurrent.list.output.PaginationBuilder
-    //eventRWFaultCurrent
     public ReadFaultcurrentListOutputBuilder readFaultCurrentList(EntityInput input) {
 
         ReadFaultcurrentListOutputBuilder outputBuilder = new ReadFaultcurrentListOutputBuilder();
@@ -181,9 +177,6 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.faultlog.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.faultlog.list.output.PaginationBuilder
-    //eventRWFaultLog
     public ReadFaultlogListOutputBuilder readFaultLogList(EntityInput input) {
         ReadFaultlogListOutputBuilder outputBuilder = new ReadFaultlogListOutputBuilder();
         QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.faultlog.list.output.Data> result =
@@ -195,9 +188,6 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.maintenance.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.maintenance.list.output.PaginationBuilder
-    //maintenanceRW
     public ReadMaintenanceListOutputBuilder readMaintenanceList(EntityInput input) {
         ReadMaintenanceListOutputBuilder outputBuilder = new ReadMaintenanceListOutputBuilder();
         QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.maintenance.list.output.Data> result =
@@ -209,9 +199,6 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.mediator.server.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.mediator.server.list.output.Pagination
-    //mediatorserverRW
     public ReadMediatorServerListOutputBuilder readMediatorServerList(EntityInput input) {
 
         ReadMediatorServerListOutputBuilder outputBuilder = new ReadMediatorServerListOutputBuilder();
@@ -224,9 +211,6 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.network.element.connection.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.network.element.connection.list.output.PaginationBuilder
-    //networkelementConnectionRW
     public ReadNetworkElementConnectionListOutputBuilder readNetworkElementConnectionList(EntityInput input) {
         ReadNetworkElementConnectionListOutputBuilder outputBuilder =
                 new ReadNetworkElementConnectionListOutputBuilder();
@@ -239,9 +223,6 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.inventory.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.inventory.list.output.PaginationBuilder
-    //equipmentRW
     public ReadInventoryListOutputBuilder readInventoryList(EntityInput input) {
         ReadInventoryListOutputBuilder outputBuilder = new ReadInventoryListOutputBuilder();
         QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.inventory.list.output.Data> result =
@@ -253,9 +234,6 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.inventory.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.inventory.list.output.PaginationBuilder
-    //connnectionlogRW
     public ReadConnectionlogListOutputBuilder readConnectionlogList(EntityInput input) {
         ReadConnectionlogListOutputBuilder outputBuilder = new ReadConnectionlogListOutputBuilder();
         QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.connectionlog.list.output.Data> result =
@@ -267,9 +245,6 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.eventlog.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.eventlog.list.output.PaginationBuilder
-    //eventlogRW
     public ReadEventlogListOutputBuilder readEventlogList(ReadEventlogListInput input) throws IOException {
         ReadEventlogListOutputBuilder outputBuilder = new ReadEventlogListOutputBuilder();
         QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.eventlog.list.output.Data> result =
@@ -281,12 +256,11 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.PaginationBuilder
     public ReadPmdata15mListOutputBuilder readPmdata15mList(EntityInput input) {
         ReadPmdata15mListOutputBuilder outputBuilder = new ReadPmdata15mListOutputBuilder();
         QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data> result =
                 this.pm15mRW.getData(input);
+        LOG.debug("Read data: readPmdata15mList: {}", result);
         outputBuilder.setData(result.getResult().getHits());
         outputBuilder.setPagination(
                 new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.PaginationBuilder(
@@ -294,8 +268,6 @@
         return outputBuilder;
     }
 
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._24h.list.output.Data
-    //org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._24h.list.output.Pagination
     public ReadPmdata24hListOutputBuilder readPmdata24hList(EntityInput input) {
         ReadPmdata24hListOutputBuilder outputBuilder = new ReadPmdata24hListOutputBuilder();
         QueryResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._24h.list.output.Data> result =
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/acessor/DataObjectAcessorStatus.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/acessor/DataObjectAcessorStatus.java
index 3926d3f..efb5221 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/acessor/DataObjectAcessorStatus.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/acessor/DataObjectAcessorStatus.java
@@ -22,7 +22,6 @@
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.data.acessor;
 
 import java.io.IOException;
-
 import org.onap.ccsdk.features.sdnr.wt.common.database.ExtRestClient;
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
 import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
@@ -31,6 +30,7 @@
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.AggregationEntries;
 import org.onap.ccsdk.features.sdnr.wt.common.database.responses.SearchResponse;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.rpctypehelper.QueryResult;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.YangHelper2;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Entity;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.status.output.Data;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.status.output.DataBuilder;
@@ -55,9 +55,13 @@
         SearchResponse response = this.dbClient.search(request);
         AggregationEntries aggs = response.getAggregations(ESDATATYPE_FAULTCURRENT_SEVERITY_KEY);
 
-        Data[] data = {new DataBuilder().setFaults(new FaultsBuilder().setCriticals(aggs.getOrDefault("Critical", 0L))
-                .setMajors(aggs.getOrDefault("Major", 0L)).setMinors(aggs.getOrDefault("Minor", 0L))
-                .setWarnings(aggs.getOrDefault("Warning", 0L)).build()).build()};
+        Data[] data = {new DataBuilder()
+                .setFaults(
+                        new FaultsBuilder().setCriticals(YangHelper2.getLongOrUint32(aggs.getOrDefault("Critical", 0L)))
+                                .setMajors(YangHelper2.getLongOrUint32(aggs.getOrDefault("Major", 0L)))
+                                .setMinors(YangHelper2.getLongOrUint32(aggs.getOrDefault("Minor", 0L)))
+                                .setWarnings(YangHelper2.getLongOrUint32(aggs.getOrDefault("Warning", 0L))).build())
+                .build()};
         long toalsize = data.length;
         return new QueryResult<Data>(1L, 1L, new SearchResult<Data>(data, toalsize));
 
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/rpctypehelper/QueryResult.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/rpctypehelper/QueryResult.java
index 4cd015a..6e653ba 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/rpctypehelper/QueryResult.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/rpctypehelper/QueryResult.java
@@ -22,8 +22,8 @@
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.data.rpctypehelper;
 
 import java.math.BigInteger;
-
 import org.onap.ccsdk.features.sdnr.wt.common.database.SearchResult;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.YangHelper2;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.PaginationOutputG;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.connectionlog.list.output.PaginationBuilder;
 
@@ -36,9 +36,9 @@
         this.result = result;
 
         PaginationBuilder x = new PaginationBuilder();
-        x.setPage(BigInteger.valueOf(page));
-        x.setSize(pageSize);
-        x.setTotal(BigInteger.valueOf(result.getTotal()));
+        x.setPage(YangHelper2.getBigIntegerOrUint64(BigInteger.valueOf(page)));
+        x.setSize(YangHelper2.getLongOrUint32(pageSize));
+        x.setTotal(YangHelper2.getBigIntegerOrUint64(BigInteger.valueOf(result.getTotal())));
         pagination = x.build();
     }
 
@@ -46,9 +46,9 @@
         this.result = result;
 
         PaginationBuilder x = new PaginationBuilder();
-        x.setPage(BigInteger.valueOf(queryByFilter.getPage()));
-        x.setSize(queryByFilter.getPageSize());
-        x.setTotal(BigInteger.valueOf(result.getTotal()));
+        x.setPage(YangHelper2.getBigIntegerOrUint64(BigInteger.valueOf(queryByFilter.getPage())));
+        x.setSize(YangHelper2.getLongOrUint32(queryByFilter.getPageSize()));
+        x.setTotal(YangHelper2.getBigIntegerOrUint64(BigInteger.valueOf(result.getTotal())));
         pagination = x.build();
     }
 
@@ -61,6 +61,11 @@
         return pagination;
     }
 
+    @Override
+    public String toString() {
+        return "QueryResult [result=" + result + ", pagination=" + pagination + "]";
+    }
+
 
 
 }
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/EsDataObjectReaderWriter2.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/EsDataObjectReaderWriter2.java
index bf1aff3..603c25b 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/EsDataObjectReaderWriter2.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/database/EsDataObjectReaderWriter2.java
@@ -33,6 +33,7 @@
 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.dataprovider.yangtools.YangToolsMapper2;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapperHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Entity;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -142,7 +143,7 @@
      * @return this for further operations.
      */
     public EsDataObjectReaderWriter2<T> setEsIdAttributeNameCamelized(String esIdAttributeName) {
-        return setEsIdAttributeName(YangToolsMapper2.toCamelCaseAttributeName(esIdAttributeName));
+        return setEsIdAttributeName(YangToolsMapperHelper.toCamelCaseAttributeName(esIdAttributeName));
     }
 
     /**
@@ -360,14 +361,13 @@
             result = db.doReadAllJsonData(dataTypeName, ignoreException);
         }
         hits = result.getHits();
-        LOG.debug("Read: {} elements: {}  Failures: {}", dataTypeName, hits.size(),
-                yangtoolsMapper.getMappingFailures());
+        LOG.debug("Read: {} elements: {}", dataTypeName, hits.size());
 
         T object;
         for (SearchHit hit : hits) {
             object = getT(hit.getSourceAsString());
-            LOG.debug("Mapp Object: {}\nSource: '{}'\nResult: '{}'\n Failures: {}", hit.getId(),
-                    hit.getSourceAsString(), object, yangtoolsMapper.getMappingFailures());
+            LOG.debug("Mapp Object: {}\nSource: '{}'\nResult: '{}'\n", hit.getId(),
+                    hit.getSourceAsString(), object);
             if (object != null) {
                 setEsId(object, hit.getId());
                 res.add(object);
@@ -397,7 +397,7 @@
         try {
             return yangtoolsMapper.readValue(jsonString, clazz);
         } catch (IOException e) {
-            LOG.info("Mapping problem", e);
+            LOG.info("Mapping problem {}:", clazz.getName(), e);
             return null;
         }
     }
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java
index 085d381..bb4023a 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/DataTreeHttpServlet.java
@@ -28,16 +28,13 @@
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
 import org.json.JSONObject;
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.impl.DataTreeProviderImpl;
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/AboutHttpServlet.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/AboutHttpServlet.java
index 81b9645..fd6be82 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/AboutHttpServlet.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/AboutHttpServlet.java
@@ -73,7 +73,7 @@
     private static final String README_FILE = "README.md";
     private static final String NO_DEVICEMANAGERS_RUNNING_MESSAGE = null;
 
-    private final String groupId = "org.onap.ccsdk.features.sdnr.wt";
+    private final String groupId = this.getGroupIdOrDefault("org.onap.ccsdk.features.sdnr.wt");
     private final String artifactId = "sdnr-wt-data-provider-provider";
 
     private final Map<Integer,String> BUNDLESTATE_LUT;
@@ -97,7 +97,18 @@
 
     }
 
-    //	public void setBundleService(BundleService bundleService) {
+    protected String getGroupIdOrDefault(String def) {
+		String symbolicName = this.getManifestValue("Bundle-SymbolicName");
+		if(symbolicName!=null) {
+			int idx =  symbolicName.indexOf(this.artifactId);
+			if(idx>0) {
+				return symbolicName.substring(0, idx-1);
+			}
+		}
+		return def;
+	}
+
+	//	public void setBundleService(BundleService bundleService) {
     //		this.bundleService = bundleService;
     //	}
 
@@ -199,7 +210,7 @@
      * @param key
      * @return
      */
-    private String getManifestValue(String key) {
+    protected String getManifestValue(String key) {
         URL url = Resources.getUrlForRessource(AboutHttpServlet.class, "/META-INF/MANIFEST.MF");
         if (url == null) {
             return null;
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/ODLVersionLUT.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/ODLVersionLUT.java
index b08e5ad..491775e 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/ODLVersionLUT.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/http/about/ODLVersionLUT.java
@@ -60,6 +60,7 @@
         }
         if(odlMdsalVersionLUT==null) {
             odlMdsalVersionLUT = new HashMap<>();
+            odlMdsalVersionLUT.put("6.0.7","aluminium-SR1 (0.13.1)");
             odlMdsalVersionLUT.put("6.0.4","aluminium-SR0 (0.13.0)");
             odlMdsalVersionLUT.put("5.0.14","magnesium-SR2 (0.12.2)");
             odlMdsalVersionLUT.put("5.0.10","magnesium-SR1 (0.12.1)");
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java
index ac0ee92..5c1ea98 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderImpl.java
@@ -22,6 +22,7 @@
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.impl;
 
 import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient;
+import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClientException;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.DataTreeHttpServlet;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.MsServlet;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.http.ReadyHttpServlet;
@@ -74,11 +75,16 @@
     public void init() throws Exception {
 
         LOG.info("Session Initiated start {}", APPLICATION_NAME);
-
-        // Start RPC Service
-        this.rpcApiService = new DataProviderServiceImpl(rpcProviderService, this.mediatorServerServlet);
-        this.treeServlet.setDatabaseClient(this.rpcApiService.getRawClient());
-        LOG.info("Session Initiated end. Initialization done");
+        try {
+            // Start RPC Service
+            this.rpcApiService = new DataProviderServiceImpl(rpcProviderService, this.mediatorServerServlet);
+            this.treeServlet.setDatabaseClient(this.rpcApiService.getRawClient());
+            LOG.info("Session Initiated end. Initialization done");
+        } catch (Exception e) {
+            if (e instanceof HtDatabaseClientException)
+                LOG.error("IOException: Could not connect to the Database. Please check Database connectivity");
+            throw e;
+        }
     }
 
     @Override
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java
index 30819dc..5ef7a0a 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/impl/DataProviderServiceImpl.java
@@ -57,6 +57,8 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadFaultcurrentListOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadFaultlogListInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadFaultlogListOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadGuiCutThroughEntryInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadGuiCutThroughEntryOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadInventoryListInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadInventoryListOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadMaintenanceListInput;
@@ -85,9 +87,6 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.UpdateMediatorServerOutput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.UpdateNetworkElementConnectionInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.UpdateNetworkElementConnectionOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadGuiCutThroughEntryInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadGuiCutThroughEntryOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadGuiCutThroughEntryOutputBuilder;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.concepts.ObjectRegistration;
 import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -165,7 +164,7 @@
     @Override
     public ListenableFuture<RpcResult<ReadFaultcurrentListOutput>> readFaultcurrentList(
             ReadFaultcurrentListInput input) {
-        LOG.debug("RPC Request: getFaultCurrentEntityList with input {}", input);
+        LOG.debug("RPC Request: readFaultCurrentList with input {}", input);
         RpcResultBuilder<ReadFaultcurrentListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readFaultCurrentList(input));
         return result.buildFuture();
@@ -173,7 +172,7 @@
 
     @Override
     public ListenableFuture<RpcResult<ReadFaultlogListOutput>> readFaultlogList(ReadFaultlogListInput input) {
-        LOG.debug("RPC Request: getFaultCurrentEntityList with input {}", input);
+        LOG.debug("RPC Request: readFaultlogList with input {}", input);
         RpcResultBuilder<ReadFaultlogListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readFaultLogList(input));
         return result.buildFuture();
@@ -181,7 +180,7 @@
 
     @Override
     public ListenableFuture<RpcResult<ReadMaintenanceListOutput>> readMaintenanceList(ReadMaintenanceListInput input) {
-        LOG.debug("RPC Request: getMaintenanceEntityList with input {}", input);
+        LOG.debug("RPC Request: readMaintenanceList with input {}", input);
         RpcResultBuilder<ReadMaintenanceListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readMaintenanceList(input));
         return result.buildFuture();
@@ -190,7 +189,7 @@
     @Override
     public ListenableFuture<RpcResult<ReadMediatorServerListOutput>> readMediatorServerList(
             ReadMediatorServerListInput input) {
-        LOG.debug("RPC Request: getMediatorServerEntityList with input {}", input);
+        LOG.debug("RPC Request: readMediatorServerList with input {}", input);
         RpcResultBuilder<ReadMediatorServerListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readMediatorServerList(input));
         return result.buildFuture();
@@ -199,7 +198,7 @@
     @Override
     public ListenableFuture<RpcResult<ReadNetworkElementConnectionListOutput>> readNetworkElementConnectionList(
             ReadNetworkElementConnectionListInput input) {
-        LOG.debug("RPC Request: getNetworkElementConnectionEntityList with input {}", input);
+        LOG.debug("RPC Request: readNetworkElementConnectionList with input {}", input);
         RpcResultBuilder<ReadNetworkElementConnectionListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readNetworkElementConnectionList(input));
         return result.buildFuture();
@@ -208,7 +207,7 @@
 
     @Override
     public ListenableFuture<RpcResult<ReadPmdata15mListOutput>> readPmdata15mList(ReadPmdata15mListInput input) {
-        LOG.debug("RPC Request: getNetworkElementConnectionEntityList with input {}", input);
+        LOG.debug("RPC Request: readPmdata15mList with input {}", input);
         RpcResultBuilder<ReadPmdata15mListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readPmdata15mList(input));
         return result.buildFuture();
@@ -217,7 +216,7 @@
 
     @Override
     public ListenableFuture<RpcResult<ReadPmdata24hListOutput>> readPmdata24hList(ReadPmdata24hListInput input) {
-        LOG.debug("RPC Request: getNetworkElementConnectionEntityList with input {}", input);
+        LOG.debug("RPC Request: readPmdata24hList with input {}", input);
         RpcResultBuilder<ReadPmdata24hListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readPmdata24hList(input));
         return result.buildFuture();
@@ -226,7 +225,7 @@
 
     @Override
     public ListenableFuture<RpcResult<ReadStatusOutput>> readStatus(ReadStatusInput input) {
-        LOG.debug("RPC Request: getStatusEntityList with input {}", input);
+        LOG.debug("RPC Request: readStatusEntityList with input {}", input);
         RpcResultBuilder<ReadStatusOutput> result = read(() -> DataProviderServiceImpl.this.dataProvider.readStatus());
         return result.buildFuture();
 
@@ -234,7 +233,7 @@
 
     @Override
     public ListenableFuture<RpcResult<ReadInventoryListOutput>> readInventoryList(ReadInventoryListInput input) {
-        LOG.debug("RPC Request: getInventoryEntityList with input {}", input);
+        LOG.debug("RPC Request: readInventoryList with input {}", input);
         RpcResultBuilder<ReadInventoryListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readInventoryList(input));
         return result.buildFuture();
@@ -243,7 +242,7 @@
     @Override
     public ListenableFuture<RpcResult<ReadPmdata15mLtpListOutput>> readPmdata15mLtpList(
             ReadPmdata15mLtpListInput input) {
-        LOG.debug("RPC Request: readPmdataLtpList with input {}", input);
+        LOG.debug("RPC Request: readPmdata15mLtpList with input {}", input);
         RpcResultBuilder<ReadPmdata15mLtpListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readPmdata15mLtpList(input));
         return result.buildFuture();
@@ -252,7 +251,7 @@
     @Override
     public ListenableFuture<RpcResult<ReadPmdata15mDeviceListOutput>> readPmdata15mDeviceList(
             ReadPmdata15mDeviceListInput input) {
-        LOG.debug("RPC Request: readPmdataDeviceList with input {}", input);
+        LOG.debug("RPC Request: readPmdata15mDeviceList with input {}", input);
         RpcResultBuilder<ReadPmdata15mDeviceListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readPmdata15mDeviceList(input));
         return result.buildFuture();
@@ -261,7 +260,7 @@
     @Override
     public ListenableFuture<RpcResult<ReadPmdata24hLtpListOutput>> readPmdata24hLtpList(
             ReadPmdata24hLtpListInput input) {
-        LOG.debug("RPC Request: readPmdataLtpList with input {}", input);
+        LOG.debug("RPC Request: readPmdata24hLtpList with input {}", input);
         RpcResultBuilder<ReadPmdata24hLtpListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readPmdata24hLtpList(input));
         return result.buildFuture();
@@ -270,7 +269,7 @@
     @Override
     public ListenableFuture<RpcResult<ReadPmdata24hDeviceListOutput>> readPmdata24hDeviceList(
             ReadPmdata24hDeviceListInput input) {
-        LOG.debug("RPC Request: readPmdataDeviceList with input {}", input);
+        LOG.debug("RPC Request: readPmdata24hDeviceList with input {}", input);
         RpcResultBuilder<ReadPmdata24hDeviceListOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readPmdata24hDeviceList(input));
         return result.buildFuture();
@@ -306,6 +305,7 @@
     @Override
     public ListenableFuture<RpcResult<DeleteNetworkElementConnectionOutput>> deleteNetworkElementConnection(
             DeleteNetworkElementConnectionInput input) {
+        LOG.debug("RPC Request: deleteNetworkElementConnection with input {}", input);
         RpcResultBuilder<DeleteNetworkElementConnectionOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.deleteNetworkElementConnection(input));
         return result.buildFuture();
@@ -376,7 +376,7 @@
     @Override
     public ListenableFuture<RpcResult<ReadGuiCutThroughEntryOutput>> readGuiCutThroughEntry(
             ReadGuiCutThroughEntryInput input) {
-        LOG.debug("RPC Request: readGuiCutThroughEntry with input {}", input);
+        LOG.debug("RPC Request: getGuiCutThroughEntry with input {}", input);
         RpcResultBuilder<ReadGuiCutThroughEntryOutput> result =
                 read(() -> DataProviderServiceImpl.this.dataProvider.readGuiCutThroughEntry(input));
         return result.buildFuture();
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/DateAndTimeBuilder.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/DateAndTimeBuilder.java
deleted file mode 100644
index 6288900..0000000
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/DateAndTimeBuilder.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools;
-
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
-
-public class DateAndTimeBuilder {
-	 private final String _value;
-
-     public DateAndTimeBuilder(String v) {
-         this._value = v;
-     }
-
-     public DateAndTime build() {
-         return new DateAndTime(_value);
-     }
-}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapper.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapper.java
index 0b1e7d5..e7580c6 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapper.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapper.java
@@ -21,33 +21,15 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools;
 
-import java.io.IOException;
-import javax.annotation.Nullable;
-
-import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.Credentials;
-import org.opendaylight.yangtools.concepts.Builder;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.PropertyNamingStrategy;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
-import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder.Value;
-import com.fasterxml.jackson.databind.introspect.AnnotatedClass;
-import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.databind.ser.std.StdSerializer;
-
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.mapperextensions.YangToolsBuilderAnnotationIntrospector;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.mapperextensions.YangToolsModule;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * YangToolsMapper is a specific Jackson mapper configuration for opendaylight yangtools serialization or
@@ -56,182 +38,23 @@
  */
 public class YangToolsMapper extends ObjectMapper {
 
+    @SuppressWarnings("unused")
     private final Logger LOG = LoggerFactory.getLogger(YangToolsMapper.class);
     private static final long serialVersionUID = 1L;
-    private static BundleContext context;
 
     public YangToolsMapper() {
+        this(new YangToolsBuilderAnnotationIntrospector());
+    }
+
+    protected YangToolsMapper(YangToolsBuilderAnnotationIntrospector yangToolsBuilderAnnotationIntrospector) {
         super();
+
         configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
         setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
         setSerializationInclusion(Include.NON_NULL);
-        setAnnotationIntrospector(new YangToolsBuilderAnnotationIntrospector());
-        SimpleModule dateAndTimeSerializerModule = new SimpleModule();
-        dateAndTimeSerializerModule.addSerializer(DateAndTime.class, new CustomDateAndTimeSerializer());
-        registerModule(dateAndTimeSerializerModule);
-        Bundle bundle = FrameworkUtil.getBundle(YangToolsMapper.class);
-        context = bundle != null ? bundle.getBundleContext() : null;
+        enable(MapperFeature.USE_GETTERS_AS_SETTERS);
+        setAnnotationIntrospector(yangToolsBuilderAnnotationIntrospector);
+        registerModule(new YangToolsModule());
     }
 
-    @Override
-    public String writeValueAsString(Object value) throws JsonProcessingException {
-        // TODO Auto-generated method stub
-        return super.writeValueAsString(value);
-    }
-
-    /**
-     * Get Builder object for yang tools interface.
-     * 
-     * @param <T> yang-tools base datatype
-     * @param clazz class with interface.
-     * @return builder for interface or null if not existing
-     */
-    @SuppressWarnings("unchecked")
-    public @Nullable <T extends DataObject> Builder<T> getBuilder(Class<T> clazz) {
-        String builder = clazz.getName() + "Builder";
-        try {
-            Class<?> clazzBuilder = findClass(builder);
-            return (Builder<T>) clazzBuilder.newInstance();
-        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
-            LOG.debug("Problem ", e);
-            return null;
-        }
-    }
-
-    /**
-     * Callback for handling mapping failures.
-     * 
-     * @return
-     */
-    public int getMappingFailures() {
-        return 0;
-    }
-
-    /**
-     * Provide mapping of string to attribute names, generated by yang-tools. "netconf-id" converted to "_netconfId"
-     * 
-     * @param name with attribute name, not null or empty
-     * @return converted string or null if name was empty or null
-     */
-    public @Nullable static String toCamelCaseAttributeName(final String name) {
-        if (name == null || name.isEmpty())
-            return null;
-
-        final StringBuilder ret = new StringBuilder(name.length());
-        if (!name.startsWith("_"))
-            ret.append('_');
-        int start = 0;
-        for (final String word : name.split("-")) {
-            if (!word.isEmpty()) {
-                if (start++ == 0) {
-                    ret.append(Character.toLowerCase(word.charAt(0)));
-                } else {
-                    ret.append(Character.toUpperCase(word.charAt(0)));
-                }
-                ret.append(word.substring(1));
-            }
-        }
-        return ret.toString();
-    }
-
-    /**
-     * Adapted Builder callbacks
-     */
-    private static class YangToolsBuilderAnnotationIntrospector extends JacksonAnnotationIntrospector {
-        private static final long serialVersionUID = 1L;
-
-        @Override
-        public Class<?> findPOJOBuilder(AnnotatedClass ac) {
-            try {
-                String builder = null;
-                if (ac.getRawType().equals(Credentials.class)) {
-                    builder =
-                            "org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordBuilder";
-                    //System.out.println(DataContainer.class.isAssignableFrom(ac.getRawType()));
-                    //System.out.println(ChoiceIn.class.isAssignableFrom(ac.getRawType()));
-
-                } else if (ac.getRawType().equals(DateAndTime.class)) {
-                    builder = DateAndTimeBuilder.class.getName();
-                }
-
-                else {
-                    if (ac.getRawType().isInterface()) {
-                        builder = ac.getName() + "Builder";
-                    }
-                }
-                if (builder != null) {
-                    //System.out.println("XX1: "+ac.getRawType());
-                    //System.out.println("XX2: "+builder);
-                    //Class<?> innerBuilder = Class.forName(builder);
-                    Class<?> innerBuilder = findClass(builder);
-                    //System.out.println("Builder found: "+ innerBuilder);
-                    return innerBuilder;
-                }
-            } catch (ClassNotFoundException e) {
-                // No problem .. try next
-            }
-            return super.findPOJOBuilder(ac);
-        }
-
-        @Override
-        public Value findPOJOBuilderConfig(AnnotatedClass ac) {
-            if (ac.hasAnnotation(JsonPOJOBuilder.class)) {
-                return super.findPOJOBuilderConfig(ac);
-            }
-            return new JsonPOJOBuilder.Value("build", "set");
-        }
-    }
-
-    private static Class<?> findClass(String name) throws ClassNotFoundException {
-        // Try to find in other bundles
-        if (context != null) {
-            //OSGi environment
-            for (Bundle b : context.getBundles()) {
-                try {
-                    return b.loadClass(name);
-                } catch (ClassNotFoundException e) {
-                    // No problem, this bundle doesn't have the class
-                }
-            }
-            throw new ClassNotFoundException("Can not find Class in OSGi context.");
-        } else {
-            return Class.forName(name);
-        }
-        // not found in any bundle
-    }
-
-    public static class DateAndTimeBuilder {
-
-        private final String _value;
-
-        public DateAndTimeBuilder(String v) {
-            this._value = v;
-        }
-
-        public DateAndTime build() {
-            return new DateAndTime(_value);
-        }
-
-    }
-    public static class CustomDateAndTimeSerializer extends StdSerializer<DateAndTime> {
-
-        /**
-         * 
-         */
-        private static final long serialVersionUID = 1L;
-
-        public CustomDateAndTimeSerializer() {
-            this(null);
-        }
-
-        protected CustomDateAndTimeSerializer(Class<DateAndTime> t) {
-            super(t);
-        }
-
-        @Override
-        public void serialize(DateAndTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
-            gen.writeString(value.getValue());
-        }
-
-    }
 }
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapper2.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapper2.java
index 8f05437..a19f114 100644
--- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapper2.java
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapper2.java
@@ -21,31 +21,12 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools;
 
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.PropertyNamingStrategy;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
-import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder.Value;
-import com.fasterxml.jackson.databind.introspect.AnnotatedClass;
-import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.databind.ser.std.StdSerializer;
-import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 import javax.annotation.Nullable;
 import org.eclipse.jdt.annotation.NonNull;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev191129.PmDataType;
-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.netconf.node.topology.rev150114.netconf.node.credentials.Credentials;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.mapperextensions.YangToolsBuilderAnnotationIntrospector;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.TypeObject;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -54,17 +35,13 @@
  * deserialization of DataObject to/from JSON TODO ChoiceIn and Credentials deserialization only for
  * LoginPasswordBuilder
  */
-public class YangToolsMapper2<T extends DataObject> extends ObjectMapper {
+public class YangToolsMapper2<T extends DataObject> extends YangToolsMapper {
 
     private static final Logger LOG = LoggerFactory.getLogger(YangToolsMapper2.class);
     private static final long serialVersionUID = 1L;
-    private static String BUILDER = "Builder";
 
-    private @Nullable final Class<T> clazz;
     private @Nullable final Class<? extends Builder<? extends T>> builderClazz;
 
-    private BundleContext context;
-
     /**
      * Generic Object creation of yangtools java class builder pattern.
      *
@@ -77,32 +54,10 @@
      */
     public <X extends T, B extends Builder<X>> YangToolsMapper2(@NonNull Class<T> clazz,
             @Nullable Class<B> builderClazz) throws ClassNotFoundException {
-        super();
-        configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-        setPropertyNamingStrategy(PropertyNamingStrategy.KEBAB_CASE);
-        setSerializationInclusion(Include.NON_NULL);
-        setAnnotationIntrospector(new YangToolsBuilderAnnotationIntrospector());
-        SimpleModule dateAndTimeSerializerModule = new SimpleModule();
-        dateAndTimeSerializerModule.addSerializer(DateAndTime.class, new CustomDateAndTimeSerializer());
-        registerModule(dateAndTimeSerializerModule);
+        super(new YangToolsBuilderAnnotationIntrospector(clazz, builderClazz));
 
-        SimpleModule pmDataTypeSerializerModule = new SimpleModule();
-        pmDataTypeSerializerModule.addSerializer(PmDataType.class, new CustomPMDataTypeSerializer());
-        registerModule(pmDataTypeSerializerModule);
-        Bundle bundle = FrameworkUtil.getBundle(YangToolsMapper2.class);
-
-        this.clazz = clazz;
-        this.builderClazz = builderClazz != null ? builderClazz : getBuilderClass(getBuilderClassName(clazz));
-        context = bundle != null ? bundle.getBundleContext() : null;
-    }
-
-    public <X extends T, B extends Builder<X>> YangToolsMapper2(@NonNull Class<T> clazz) throws ClassNotFoundException {
-        this(clazz, null);
-    }
-
-    @Override
-    public String writeValueAsString(Object value) throws JsonProcessingException {
-        return super.writeValueAsString(value);
+        this.builderClazz =
+                builderClazz != null ? builderClazz : getBuilderClass(YangToolsMapperHelper.getBuilderClassName(clazz));
     }
 
     /**
@@ -115,75 +70,19 @@
     public @Nullable Builder<? extends T> getBuilder(Class<T> clazz) {
         try {
             if (builderClazz != null)
-                return builderClazz.newInstance();
+                return builderClazz.getDeclaredConstructor().newInstance();
             else
                 return null;
-        } catch (InstantiationException | IllegalAccessException e) {
-            LOG.debug("Problem ", e);
+        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException
+                | NoSuchMethodException | SecurityException e) {
+            LOG.warn("Problem intantiating Builder", e);
             return null;
         }
     }
 
-    /**
-     * Callback for handling mapping failures.
-     *
-     * @return
-     */
-    public int getMappingFailures() {
-        return 0;
-    }
-
-    /**
-     * Provide mapping of string to attribute names, generated by yang-tools. "netconf-id" converted to "_netconfId"
-     *
-     * @param name with attribute name, not null or empty
-     * @return converted string or null if name was empty or null
-     */
-    public @Nullable static String toCamelCaseAttributeName(final String name) {
-        if (name == null || name.isEmpty())
-            return null;
-
-        final StringBuilder ret = new StringBuilder(name.length());
-        if (!name.startsWith("_"))
-            ret.append('_');
-        int start = 0;
-        for (final String word : name.split("-")) {
-            if (!word.isEmpty()) {
-                if (start++ == 0) {
-                    ret.append(Character.toLowerCase(word.charAt(0)));
-                } else {
-                    ret.append(Character.toUpperCase(word.charAt(0)));
-                }
-                ret.append(word.substring(1));
-            }
-        }
-        return ret.toString();
-    }
-
-    /**
-     * Verify if builder is available
-     *
-     * @throws ClassNotFoundException
-     **/
-    public Class<?> assertBuilderClass(Class<?> clazz) throws ClassNotFoundException {
-        return getBuilderClass(getBuilderClassName(clazz));
-    }
-
     // --- Private functions
 
     /**
-     * Create name of builder class
-     *
-     * @param <T>
-     * @param clazz
-     * @return builders class name
-     * @throws ClassNotFoundException
-     */
-    private static String getBuilderClassName(Class<?> clazz) {
-        return clazz.getName() + BUILDER;
-    }
-
-    /**
      * Search builder in context
      *
      * @param name
@@ -192,128 +91,7 @@
      */
     @SuppressWarnings("unchecked")
     private <X extends T, B extends Builder<X>> Class<B> getBuilderClass(String name) throws ClassNotFoundException {
-        // Try to find in other bundles
-        if (context != null) {
-            //OSGi environment
-            for (Bundle b : context.getBundles()) {
-                LOG.info("Search in bundle: {}", b.getSymbolicName());
-                try {
-                    return (Class<B>) b.loadClass(name);
-                } catch (ClassNotFoundException e) {
-                    // No problem, this bundle doesn't have the class
-                }
-            }
-            throw new ClassNotFoundException("Can not find Class in OSGi context.");
-        } else {
-            return (Class<B>) Class.forName(name);
-        }
-        // not found in any bundle
+        return (Class<B>) YangToolsMapperHelper.getBuilderClass(name);
     }
 
-    // --- Classes
-
-    /**
-     * Adapted Builder callbacks
-     */
-    private class YangToolsBuilderAnnotationIntrospector extends JacksonAnnotationIntrospector {
-        private static final long serialVersionUID = 1L;
-
-        @Override
-        public Class<?> findPOJOBuilder(AnnotatedClass ac) {
-            Class<?> clazz2build = ac.getRawType();
-            if (clazz2build.equals(Credentials.class)) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordBuilder.class;
-
-            } else if (clazz2build.equals(DateAndTime.class)) {
-                return DateAndTimeBuilder.class;
-                //            } else if (ac.getRawType().equals(PmDataType.class)) {
-                //                LOG.info("Builder class");
-                //                return PMDataTypeBuilder.class;
-            } else if (clazz2build.equals(clazz)) {
-                return builderClazz;
-            }
-
-            if (clazz2build.isInterface() || TypeObject.class.isAssignableFrom(clazz2build)) {
-                String builder = getBuilderClassName(clazz2build);
-                LOG.info("Search: {}", builder);
-                Class<?> innerBuilder;
-                try {
-                    innerBuilder = Class.forName(builder);
-                    LOG.info("Found1: {}", innerBuilder);
-                    return innerBuilder;
-                } catch (ClassNotFoundException e) {
-                    LOG.info("Could not find {}", clazz2build);
-                    // No problem .. try next
-                }
-                try {
-                    innerBuilder = getBuilderClass(builder);
-                    LOG.info("Found2: {}", innerBuilder);
-                    return innerBuilder;
-                } catch (ClassNotFoundException e) {
-                    LOG.info("Could not find {}", clazz2build);
-                    // No problem .. try next
-                }
-            }
-            Class<?> clazz = super.findPOJOBuilder(ac);
-            return clazz;
-        }
-
-        @Override
-        public Value findPOJOBuilderConfig(AnnotatedClass ac) {
-            if (ac.hasAnnotation(JsonPOJOBuilder.class)) {
-                return super.findPOJOBuilderConfig(ac);
-            }
-            return new JsonPOJOBuilder.Value("build", "set");
-        }
-    }
-
-    public static class DateAndTimeBuilder {
-
-        private final String _value;
-
-        public DateAndTimeBuilder(String v) {
-            this._value = v;
-        }
-
-        public DateAndTime build() {
-            return new DateAndTime(_value);
-        }
-
-    }
-    public static class CustomDateAndTimeSerializer extends StdSerializer<@NonNull DateAndTime> {
-
-        private static final long serialVersionUID = 1L;
-
-        public CustomDateAndTimeSerializer() {
-            this(null);
-        }
-
-        protected CustomDateAndTimeSerializer(Class<DateAndTime> t) {
-            super(t);
-        }
-
-        @Override
-        public void serialize(DateAndTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
-            gen.writeString(value.getValue());
-        }
-
-    }
-    public static class CustomPMDataTypeSerializer extends StdSerializer<@NonNull PmDataType> {
-
-        private static final long serialVersionUID = 1L;
-
-        public CustomPMDataTypeSerializer() {
-            this(null);
-        }
-
-        protected CustomPMDataTypeSerializer(Class<PmDataType> t) {
-            super(t);
-        }
-
-        @Override
-        public void serialize(PmDataType value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
-            gen.writeString(value.toString());
-        }
-
-    }
 }
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapperHelper.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapperHelper.java
new file mode 100644
index 0000000..a2afab0
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/YangToolsMapperHelper.java
@@ -0,0 +1,244 @@
+/*
+ * ============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.dataprovider.yangtools;
+
+import com.fasterxml.jackson.databind.DeserializationContext;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Optional;
+import java.util.concurrent.ConcurrentHashMap;
+import javax.annotation.Nullable;
+import org.opendaylight.yangtools.concepts.Builder;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class YangToolsMapperHelper {
+
+    private static final Logger LOG = LoggerFactory.getLogger(YangToolsMapperHelper.class);
+    private static final String TYPEOBJECT_INSTANCE_METHOD = "getDefaultInstance";
+    private static final String BUILDER = "Builder";
+
+    private static BundleContext context = getBundleContext();
+    private static ConcurrentHashMap<String, Class<?>> cache = new ConcurrentHashMap<>();
+
+    private YangToolsMapperHelper() {
+        //Make unaccessible
+    }
+
+    public static Class<?> findClass(String name) throws ClassNotFoundException {
+
+        //Try first in cache
+        Class<?> res = cache.get(name);
+        if (res != null) {
+            return res;
+        }
+        //Try first in actual bundle
+        try {
+            return loadClass(null, name);
+        } catch (ClassNotFoundException e) {
+            // No problem, this bundle doesn't have the class
+        }
+        // Try to find in other bundles
+        if (context != null) {
+            //OSGi environment
+            for (Bundle b : context.getBundles()) {
+                try {
+                    return loadClass(b, name);
+                } catch (ClassNotFoundException e) {
+                    // No problem, this bundle doesn't have the class
+                }
+            }
+        }
+        // really not found in any bundle
+        throw new ClassNotFoundException("Can not find class '"+name+"'");
+    }
+
+    private static Class<?> loadClass(Bundle b, String name) throws ClassNotFoundException {
+        Class<?> res = b == null ? Class.forName(name) : b.loadClass(name);
+        cache.put(name, res);
+        return res;
+    }
+
+    /**
+     * Verify if builder is available
+     *
+     * @throws ClassNotFoundException
+     **/
+    public static Class<?> assertBuilderClass(Class<?> clazz) throws ClassNotFoundException {
+        return getBuilderClass(getBuilderClassName(clazz));
+    }
+
+    public static Class<?> getBuilderClass(String name) throws ClassNotFoundException {
+        return findClass(name);
+    }
+
+    public static Class<?> getBuilderClass(Class<?> clazz) throws ClassNotFoundException {
+        return findClass(getBuilderClassName(clazz));
+    }
+
+    /**
+     * Create name of builder class
+     *
+     * @param <T>
+     * @param clazz
+     * @return builders class name
+     * @throws ClassNotFoundException
+     */
+    public static String getBuilderClassName(Class<?> clazz) {
+        return clazz.getName() + BUILDER;
+    }
+
+    @SuppressWarnings("unchecked")
+    public static <B extends Builder<?>> Class<B> findBuilderClass(DeserializationContext ctxt, Class<?> clazz) throws ClassNotFoundException {
+        return (Class<B>) findClass(getBuilderClassName(clazz));
+    }
+
+    public static <B extends Builder<?>> Optional<Class<B>> findBuilderClassOptional(DeserializationContext ctxt, Class<?> clazz) {
+        try {
+            return Optional.of(findBuilderClass(ctxt, clazz));
+        } catch (ClassNotFoundException e) {
+            return Optional.empty();
+        }
+    }
+
+    public static boolean hasClassDeclaredMethod(Class<?> clazz, String name) {
+        Method[] methods = clazz.getDeclaredMethods();
+        for (Method m : methods) {
+            if (m.getName().equals(name)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @SuppressWarnings("unchecked")
+    public static <T> Optional<T> getInstanceByConstructor(Class<?> clazz, String arg) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
+        List<Class<?>> ctypes = getConstructorParameterTypes(clazz, String.class);
+        Optional<Object> oObj;
+        for (Class<?> ctype : ctypes) {
+            if (ctype.equals(String.class)) {
+                return Optional.of((T) clazz.getConstructor(ctype).newInstance(arg));
+            } else if ((oObj = getDefaultInstance(ctype, arg)).isPresent()) {
+                return Optional.of((T) clazz.getConstructor(ctype).newInstance(oObj.get()));
+            } else {
+                // TODO: recursive instantiation down to string constructor or
+                // getDefaultInstance method
+                LOG.debug("Not implemented arg:'{}' class:'{}'", arg, clazz);
+            }
+        }
+        return Optional.empty();
+    }
+
+    @SuppressWarnings("unchecked")
+    public static <T> Optional<T> getDefaultInstance(@Nullable Class<?> clazz, String arg)
+            throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException,
+            InvocationTargetException {
+        LOG.trace("arg:'{}' clazz '{}'", arg, clazz.getName());
+        if (clazz != null) {
+            Method[] methods = clazz.getDeclaredMethods();
+            for (Method m : methods) {
+                //TODO Verify argument type to avoid exception
+                if (m.getName().equals(TYPEOBJECT_INSTANCE_METHOD)) {
+                    Method method = clazz.getDeclaredMethod(TYPEOBJECT_INSTANCE_METHOD, String.class);
+                    LOG.trace("Invoke {} available {}",TYPEOBJECT_INSTANCE_METHOD, method != null);
+                    return Optional.of((T) method.invoke(null, arg));
+                }
+            }
+        }
+        return Optional.empty();
+    }
+
+    public static <T> Optional<T> getDefaultInstance(Optional<Class<T>> optionalClazz, String arg)
+            throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException,
+            InvocationTargetException {
+        if (optionalClazz.isPresent()) {
+            return getDefaultInstance(optionalClazz.get(), arg);
+        }
+        return Optional.empty();
+    }
+
+    public static List<Class<?>> getConstructorParameterTypes(Class<?> clazz, Class<?> prefer) {
+
+        Constructor<?>[] constructors = clazz.getConstructors();
+        List<Class<?>> res = new ArrayList<>();
+        for (Constructor<?> c : constructors) {
+            Class<?>[] ptypes = c.getParameterTypes();
+            if (ptypes.length == 1) {
+                res.add(ptypes[0]);
+            }
+
+            if (prefer != null && ptypes.length == 1 && ptypes[0].equals(prefer)) {
+                return Arrays.asList(prefer);
+            }
+        }
+        return res;
+    }
+
+    public static boolean implementsInterface(Class<?> clz, Class<?> ifToImplement) {
+        Class<?>[] ifs = clz.getInterfaces();
+        for (Class<?> iff : ifs) {
+            if (iff.equals(ifToImplement)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Provide mapping of string to attribute names, generated by yang-tools. "netconf-id" converted to "_netconfId"
+     *
+     * @param name with attribute name, not null or empty
+     * @return converted string or null if name was empty or null
+     */
+    public @Nullable static String toCamelCaseAttributeName(final String name) {
+        if (name == null || name.isEmpty())
+            return null;
+
+        final StringBuilder ret = new StringBuilder(name.length());
+        if (!name.startsWith("_"))
+            ret.append('_');
+        int start = 0;
+        for (final String word : name.split("-")) {
+            if (!word.isEmpty()) {
+                if (start++ == 0) {
+                    ret.append(Character.toLowerCase(word.charAt(0)));
+                } else {
+                    ret.append(Character.toUpperCase(word.charAt(0)));
+                }
+                ret.append(word.substring(1));
+            }
+        }
+        return ret.toString();
+    }
+
+    private static BundleContext getBundleContext() {
+        Bundle bundle = FrameworkUtil.getBundle(YangToolsMapperHelper.class);
+        return bundle != null ? bundle.getBundleContext() : null;
+    }
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/builder/DateAndTimeBuilder.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/builder/DateAndTimeBuilder.java
new file mode 100644
index 0000000..8dbaf4a
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/builder/DateAndTimeBuilder.java
@@ -0,0 +1,36 @@
+/*
+ * ============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.dataprovider.yangtools.builder;
+
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+
+public class DateAndTimeBuilder {
+	 private final String _value;
+
+     public DateAndTimeBuilder(String v) {
+         this._value = v;
+     }
+
+     public DateAndTime build() {
+         return new DateAndTime(_value);
+     }
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsBuilderAnnotationIntrospector.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsBuilderAnnotationIntrospector.java
new file mode 100644
index 0000000..0a119e0
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsBuilderAnnotationIntrospector.java
@@ -0,0 +1,130 @@
+/*
+ * ============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.dataprovider.yangtools.mapperextensions;
+
+import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
+import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder.Value;
+import com.fasterxml.jackson.databind.cfg.MapperConfig;
+import com.fasterxml.jackson.databind.introspect.AnnotatedClass;
+import com.fasterxml.jackson.databind.introspect.AnnotatedMethod;
+import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import java.math.BigInteger;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapperHelper;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.builder.DateAndTimeBuilder;
+//import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.builders.rev201110.read.network.element.connection.list.output.DataBuilder;
+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.netconf.node.topology.rev150114.netconf.node.credentials.Credentials;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.credentials.credentials.LoginPasswordBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
+import org.opendaylight.yangtools.yang.common.Uint8;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class YangToolsBuilderAnnotationIntrospector extends JacksonAnnotationIntrospector {
+
+    private static final Logger LOG = LoggerFactory.getLogger(YangToolsBuilderAnnotationIntrospector.class);
+    private static final long serialVersionUID = 1L;
+
+    private final Map<Class<?>, String> customDeserializer;
+
+    public YangToolsBuilderAnnotationIntrospector() {
+        this(null, null);
+    }
+
+    public YangToolsBuilderAnnotationIntrospector(Class<?> cls, Class<?> builderClass) {
+        this.customDeserializer = new HashMap<>();
+        if (cls != null && builderClass != null) {
+            this.customDeserializer.put(cls, builderClass.getName());
+        }
+        this.customDeserializer.put(DateAndTime.class, DateAndTimeBuilder.class.getName());
+        this.customDeserializer.put(Credentials.class, LoginPasswordBuilder.class.getName());
+    }
+
+    @Override
+    public Class<?> findPOJOBuilder(AnnotatedClass ac) {
+        try {
+            String builder = null;
+            if (this.customDeserializer.containsKey(ac.getRawType())) {
+                builder = this.customDeserializer.get(ac.getRawType());
+            } else {
+                if (ac.getRawType().isInterface()) {
+                    builder = ac.getName() + "Builder";
+                }
+            }
+            if (builder != null) {
+                LOG.trace("map {} with builder {}", ac.getName(), builder);
+                Class<?> innerBuilder = YangToolsMapperHelper.findClass(builder);
+                return innerBuilder;
+            }
+        } catch (ClassNotFoundException e) {
+            LOG.trace("builder class not found for {}", ac.getName());
+        }
+        return super.findPOJOBuilder(ac);
+    }
+
+    @Override
+    public Value findPOJOBuilderConfig(AnnotatedClass ac) {
+        if (ac.hasAnnotation(JsonPOJOBuilder.class)) {
+            return super.findPOJOBuilderConfig(ac);
+        }
+        return new JsonPOJOBuilder.Value("build", "set");
+    }
+
+    @Override
+    public AnnotatedMethod resolveSetterConflict(MapperConfig<?> config, AnnotatedMethod setter1,
+            AnnotatedMethod setter2) {
+        Class<?> p1 = setter1.getRawParameterType(0);
+        Class<?> p2 = setter2.getRawParameterType(0);
+        AnnotatedMethod res = null;
+
+        if (this.isAssignable(p1, p2, Map.class, List.class)) {
+			res = p1.isAssignableFrom(List.class) ? setter1 : setter2; //prefer List setter
+        } else if (this.isAssignable(p1, p2, Uint64.class, BigInteger.class)) {
+            res = setter1;
+        } else if (this.isAssignable(p1, p2, Uint32.class, Long.class)) {
+            res = setter1;
+        } else if (this.isAssignable(p1, p2, Uint16.class, Integer.class)) {
+            res = setter1;
+        } else if (this.isAssignable(p1, p2, Uint8.class, Short.class)) {
+            res = setter1;
+        }
+        if (res == null) {
+            res = super.resolveSetterConflict(config, setter1, setter2);
+        }
+        LOG.debug("{} (m1={} <=> m2={} => result:{})", setter1.getName(), p1.getSimpleName(), p2.getSimpleName(),
+                res.getRawParameterType(0).getSimpleName());
+
+        return res;
+    }
+
+    private boolean isAssignable(Class<?> p1, Class<?> p2, Class<?> c1, Class<?> c2) {
+        return ((p1.isAssignableFrom(c1) && p2.isAssignableFrom(c2))
+                || (p2.isAssignableFrom(c1) && p1.isAssignableFrom(c2)));
+
+    }
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsDeserializerModifier.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsDeserializerModifier.java
new file mode 100644
index 0000000..634a3bc
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsDeserializerModifier.java
@@ -0,0 +1,117 @@
+/*
+ * ============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.dataprovider.yangtools.mapperextensions;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.BeanDescription;
+import com.fasterxml.jackson.databind.DeserializationConfig;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.KeyDeserializer;
+import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.NoSuchElementException;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.ScalarTypeObject;
+//import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.ScalarTypeObject;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.YangHelper2;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapperHelper;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.BaseIdentityDeserializer;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.ClassDeserializer;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.IdentifierDeserializer;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.TypeObjectDeserializer;
+import org.opendaylight.yangtools.yang.binding.BaseIdentity;
+import org.opendaylight.yangtools.yang.binding.Identifier;
+import org.opendaylight.yangtools.yang.binding.TypeObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class YangToolsDeserializerModifier extends BeanDeserializerModifier {
+
+    private static final Logger LOG = LoggerFactory.getLogger(YangToolsDeserializerModifier.class);
+    private static final String getEnumMethodName="valueOf";
+
+    @Override
+    public JsonDeserializer<Enum<?>> modifyEnumDeserializer(DeserializationConfig config, final JavaType type,
+            BeanDescription beanDesc, final JsonDeserializer<?> deserializer) {
+        return new JsonDeserializer<Enum<?>>() {
+
+            @Override
+            public Enum<?> deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
+                Class<?> clazz = type.getRawClass();
+
+                try {
+                    Method method = clazz.getDeclaredMethod(getEnumMethodName, String.class);
+                    Enum<?> result = (Enum<?>) method.invoke(null, jp.getValueAsString());
+                    LOG.debug("Deserialize '{}' with class '{}' to '{}'", jp.getValueAsString(), clazz.getName(), result);
+                    return result;
+                } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
+                        | NoSuchMethodException | NoSuchElementException | SecurityException e) {
+                    LOG.warn("problem deserializing enum for {} with value {}: {}", clazz.getName(),
+                            jp.getValueAsString(), e);
+                }
+                throw new IOException(
+                        "unable to parse enum (" + type.getRawClass() + ")for value " + jp.getValueAsString());
+            }
+        };
+    }
+
+    @Override
+    public JsonDeserializer<?> modifyDeserializer(DeserializationConfig config, BeanDescription beanDesc,
+            JsonDeserializer<?> deserializer) {
+        final JavaType type = beanDesc.getType();
+        final Class<?> rawClass = type.getRawClass();
+
+        JsonDeserializer<?> deser = super.modifyDeserializer(config, beanDesc, deserializer);
+
+        if (YangToolsMapperHelper.implementsInterface(rawClass, TypeObject.class)) {
+            deser = new TypeObjectDeserializer<TypeObject>(type, deser);
+        } else if (YangToolsMapperHelper.implementsInterface(rawClass, YangHelper2.getScalarTypeObjectClass())) {
+            deser = new TypeObjectDeserializer<ScalarTypeObject>(type, deser);
+        } else if (YangToolsMapperHelper.implementsInterface(rawClass, BaseIdentity.class)) {
+            deser = new BaseIdentityDeserializer<BaseIdentity>(deser);
+        } else if (rawClass.equals(Class.class)) {
+            deser = new ClassDeserializer(rawClass);
+        }
+
+        LOG.debug("Deserialize '{}' with deserializer '{}'", rawClass.getName(), deser.getClass().getName());
+        return deser;
+    }
+
+    @Override
+    public KeyDeserializer modifyKeyDeserializer(DeserializationConfig config, JavaType type, KeyDeserializer deser) {
+        KeyDeserializer res;
+        if (YangToolsMapperHelper.implementsInterface(type.getRawClass(), Identifier.class)) {
+            res = new IdentifierDeserializer();
+        } else {
+            res = super.modifyKeyDeserializer(config, type, deser);
+        }
+        LOG.debug("Keydeserialize '{}' with deserializer '{}'", type.getRawClass().getName(), res.getClass().getName());
+        return res;
+    }
+
+    void test() {
+        com.fasterxml.jackson.databind.util.ClassUtil xy;
+    }
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsModule.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsModule.java
new file mode 100644
index 0000000..46f69d4
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/mapperextensions/YangToolsModule.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.dataprovider.yangtools.mapperextensions;
+
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import java.util.Map;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.DateAndTimeSerializer;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.EnumSerializer;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.IdentifierDeserializer;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.MapSerializer;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.serialize.TypeObjectSerializer;
+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.rev201110.pmdata.grp.MeasurementKey;
+import org.opendaylight.yangtools.yang.binding.TypeObject;
+
+public class YangToolsModule extends SimpleModule {
+
+    private static final long serialVersionUID = 1L;
+
+    public YangToolsModule() {
+        super();
+        setDeserializerModifier(new YangToolsDeserializerModifier());
+
+        addKeyDeserializer(MeasurementKey.class, new IdentifierDeserializer());
+        addSerializer(DateAndTime.class, new DateAndTimeSerializer());
+        addSerializer(TypeObject.class, new TypeObjectSerializer());
+        addSerializer(Enum.class, new EnumSerializer());
+        addSerializer(Map.class, new MapSerializer());
+    }
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/BaseIdentityDeserializer.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/BaseIdentityDeserializer.java
new file mode 100644
index 0000000..10f18e7
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/BaseIdentityDeserializer.java
@@ -0,0 +1,64 @@
+/*
+ * ============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.dataprovider.yangtools.serialize;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import java.io.IOException;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapperHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BaseIdentityDeserializer<T> extends JsonDeserializer<T> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(BaseIdentityDeserializer.class);
+    private final JsonDeserializer<?> deser;
+
+    public BaseIdentityDeserializer(final JsonDeserializer<?> deser) {
+        this.deser = deser;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public T deserialize(JsonParser parser, DeserializationContext ctxt) throws IOException, JsonProcessingException {
+        LOG.debug("BaseIdentityDeserializer class for '{}'",parser.getValueAsString());
+        String clazzToSearch = parser.getValueAsString();
+        // clazz from Elasticsearch is full qualified
+        int lastDot = clazzToSearch.lastIndexOf(".");
+        if (lastDot > -1) {
+            clazzToSearch = clazzToSearch.substring(lastDot+1);
+        } else {
+            clazzToSearch = clazzToSearch.substring(0, 1).toUpperCase() + clazzToSearch.substring(1);
+        }
+        Class<?> clazz;
+        try {
+            clazz = YangToolsMapperHelper.findClass(clazzToSearch);
+            if (clazz != null)
+                return (T)clazz;
+        } catch (ClassNotFoundException e) {
+            LOG.warn("BaseIdentityDeserializer class not found for '"+parser.getValueAsString()+"'",e);
+        }
+        return (T) deser.deserialize(parser, ctxt);
+    }
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/ClassDeserializer.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/ClassDeserializer.java
new file mode 100644
index 0000000..2627c2a
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/ClassDeserializer.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.dataprovider.yangtools.serialize;
+
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.deser.std.FromStringDeserializer;
+import java.io.IOException;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapperHelper;
+
+public class ClassDeserializer extends FromStringDeserializer<Class<?>> {
+
+    private static final long serialVersionUID = 1L;
+
+    public ClassDeserializer(Class<?> vc) {
+        super(vc);
+    }
+
+    @Override
+    protected Class<?> _deserialize(String value, DeserializationContext ctxt) throws IOException {
+        try {
+            return YangToolsMapperHelper.findClass(value);
+        } catch (ClassNotFoundException e) {
+            throw new IOException("Can not find class "+value,e);
+        }
+    }
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/DateAndTimeSerializer.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/DateAndTimeSerializer.java
new file mode 100644
index 0000000..a35aad7
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/DateAndTimeSerializer.java
@@ -0,0 +1,51 @@
+/*
+ * ============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.dataprovider.yangtools.serialize;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
+
+/**
+ * DateAndTime shouldn't be encapsulated into a json object to be able to use elasticsearch date time query functions.
+ */
+public class DateAndTimeSerializer extends StdSerializer<@NonNull DateAndTime> {
+
+    private static final long serialVersionUID = 1L;
+
+    public DateAndTimeSerializer() {
+        this(null);
+    }
+
+    protected DateAndTimeSerializer(Class<DateAndTime> t) {
+        super(t);
+    }
+
+    @Override
+    public void serialize(DateAndTime value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+        gen.writeString(value.getValue());
+    }
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/EnumSerializer.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/EnumSerializer.java
new file mode 100644
index 0000000..f8220c2
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/EnumSerializer.java
@@ -0,0 +1,36 @@
+/*
+ * ============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.dataprovider.yangtools.serialize;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+
+@SuppressWarnings("rawtypes")
+public class EnumSerializer extends JsonSerializer<Enum> {
+
+    @Override
+    public void serialize(Enum value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+        gen.writeString(value.name());
+    }
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/IdentifierDeserializer.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/IdentifierDeserializer.java
new file mode 100644
index 0000000..0837b8a
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/IdentifierDeserializer.java
@@ -0,0 +1,71 @@
+/*
+ * ============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.dataprovider.yangtools.serialize;
+
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.KeyDeserializer;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapperHelper;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint64;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class IdentifierDeserializer extends KeyDeserializer {
+
+    private static final Logger LOG = LoggerFactory.getLogger(IdentifierDeserializer.class);
+
+    public IdentifierDeserializer() {}
+
+    @Override
+    public Object deserializeKey(String key, DeserializationContext ctxt) throws IOException {
+        Class<?> clazz = ctxt.getClass();
+        final String arg = key;
+        LOG.debug("Deserialization for key:{}",key);
+        // find constructor argument types
+        List<Class<?>> ctypes = YangToolsMapperHelper.getConstructorParameterTypes(clazz, String.class);
+        for (Class<?> ctype : ctypes) {
+            try {
+                if (ctype.equals(String.class)) {
+                    return clazz.getConstructor(ctype).newInstance(arg);
+                } else if (ctype.equals(Uint16.class)) {
+                    return clazz.getConstructor(ctype).newInstance(Uint16.valueOf(arg));
+
+                } else if (ctype.equals(Uint32.class)) {
+                    return clazz.getConstructor(ctype).newInstance(Uint32.valueOf(arg));
+                } else if (ctype.equals(Uint64.class)) {
+                    return clazz.getConstructor(ctype).newInstance(Uint64.valueOf(arg));
+                }
+            } catch (InstantiationException | IllegalAccessException | IllegalArgumentException
+                    | InvocationTargetException | NoSuchMethodException | SecurityException e) {
+                LOG.warn("unable to instantiate class {} with arg {}: ", clazz, arg, e);
+                throw new IllegalArgumentException(
+                        "unable to instantiate class " + clazz.getName() + " with arg '" + arg + "' ", e);
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/MapSerializer.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/MapSerializer.java
new file mode 100644
index 0000000..e5c966a
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/MapSerializer.java
@@ -0,0 +1,37 @@
+/*
+ * ============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.dataprovider.yangtools.serialize;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.util.Map;
+
+@SuppressWarnings("rawtypes")
+public class MapSerializer extends JsonSerializer<Map> {
+
+        @Override
+        public void serialize(Map value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+            gen.writeObject(value.values());
+        }
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/TypeObjectDeserializer.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/TypeObjectDeserializer.java
new file mode 100644
index 0000000..5beca0d
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/TypeObjectDeserializer.java
@@ -0,0 +1,87 @@
+/*
+ * ============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.dataprovider.yangtools.serialize;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.NoSuchElementException;
+import java.util.Optional;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapperHelper;
+import org.opendaylight.yangtools.concepts.Builder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TypeObjectDeserializer<T> extends JsonDeserializer<T> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(TypeObjectDeserializer.class);
+    private final JavaType type;
+    private final JsonDeserializer<?> deser;
+
+
+    public TypeObjectDeserializer(final JavaType type, final JsonDeserializer<?> deser) {
+        this.type = type;
+        this.deser = deser;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public T deserialize(JsonParser parser, DeserializationContext ctxt) throws IOException, JsonProcessingException {
+
+        Class<T> clazz = (Class<T>) type.getRawClass();
+        final String arg = parser.getValueAsString();
+        LOG.debug("Try to build arg:'{}' with class {}",arg, clazz);
+        Optional<T> oRes = Optional.empty();
+        try {
+            //try get method for default instance
+            if ((oRes = YangToolsMapperHelper.getDefaultInstance(clazz, arg)).isEmpty()) {
+                //try to find builder with getDefaultInstance method
+                Optional<Class<Builder<?>>> oBuilderClazz = YangToolsMapperHelper.findBuilderClassOptional(ctxt, clazz);
+                LOG.debug("Try builder class present:{}",oBuilderClazz.isPresent());
+                if (oBuilderClazz.isEmpty()
+                        || ((oRes = YangToolsMapperHelper.getDefaultInstance(oBuilderClazz.get(), arg)).isEmpty())) {
+                    //try to find constructor with string
+                    LOG.debug("Try constructor");
+                    if ((oRes = YangToolsMapperHelper.getInstanceByConstructor(clazz, arg)).isEmpty()) {
+                        //forward to standard deserializer or throw if not available
+                        LOG.debug("Try default deserializer");
+                        oRes = Optional.of((T) deser.deserialize(parser, ctxt));
+                    }
+                }
+            }
+            LOG.debug("Deserialize string value:{} for class:{} success:{}", arg, clazz, oRes.isPresent());
+        } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException
+                | NoSuchElementException | SecurityException | InstantiationException e) {
+            LOG.warn("problem deserializing {} with value {}: {}", clazz.getName(), arg, e);
+        }
+        if (oRes.isPresent()) {
+            return oRes.get();
+        } else {
+            throw new IllegalArgumentException("Could not find constructor for arg:'" + arg + "' and class: " + clazz);
+        }
+    }
+
+}
diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/TypeObjectSerializer.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/TypeObjectSerializer.java
new file mode 100644
index 0000000..1269d07
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/yangtools/serialize/TypeObjectSerializer.java
@@ -0,0 +1,51 @@
+/*
+ * ============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.dataprovider.yangtools.serialize;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import org.opendaylight.yangtools.yang.binding.TypeObject;
+
+public class TypeObjectSerializer extends JsonSerializer<TypeObject> {
+
+    @Override
+    public void serialize(TypeObject value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+        //stringValue
+        Method[] methods = value.getClass().getDeclaredMethods();
+        String name;
+        for (Method method : methods) {
+            name = method.getName();
+            if (name.equals("stringValue") || name.equals("getValue")) {
+                try {
+                    gen.writeString((String)method.invoke(value));
+                } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
+                        | IOException e) {
+                    throw new IOException("No String getter method supported TypeObject for "+value.getClass(),e);
+                }
+            }
+        }
+    }
+}
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java
index 92ac047..624451c 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestAbout.java
@@ -21,6 +21,7 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
 
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -31,6 +32,8 @@
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import org.jline.utils.Log;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -103,7 +106,12 @@
         assertTrue(printOut.getByteArrayOutputStream().size() > 0);
     }
 
-
+    @Test
+    public void testGetGroupId() {
+    	AboutHelperServlet sv = new AboutHelperServlet();
+    	assertNotNull(sv.getGroupIdOrDefault(null));
+    }
+    
 
     private class AboutHelperServlet extends AboutHttpServlet {
 
@@ -116,6 +124,16 @@
         public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
             super.doGet(req, resp);
         }
-
+        @Override
+        public String getGroupIdOrDefault(String def) {
+    		return super.getGroupIdOrDefault(def);
+    	}
+        @Override
+        protected String getManifestValue(String key) {
+        	if(key == "Bundle-SymbolicName") {
+        		return "org.onap.ccsdk.features.sdnr.wt.sdnr-wt-data-provider-provider";
+        	}
+        	return super.getManifestValue(key);
+        }
     }
 }
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 5f78999..b7a4db5 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
@@ -42,7 +42,7 @@
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.ElasticSearchDataProvider;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.YangHelper2;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.test.util.HostInfoForTest;
-import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapper2;
+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.rev201110.CreateMaintenanceInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.CreateMaintenanceInputBuilder;
@@ -61,7 +61,7 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.DeleteNetworkElementConnectionInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Entity;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Faultlog;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.GranularityPeriodType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadConnectionlogListInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.ReadConnectionlogListInputBuilder;
@@ -306,7 +306,7 @@
 
         CreateNetworkElementConnectionOutputBuilder create = null;
         CreateNetworkElementConnectionInput input = new CreateNetworkElementConnectionInputBuilder().setNodeId(name)
-                .setIsRequired(true).setHost(url).setPort(port).build();
+                .setIsRequired(true).setHost(url).setPort(YangHelper2.getLongOrUint32(port)).build();
         String dbId = null;
 
         try {
@@ -342,7 +342,7 @@
         final long port2 = 5960;
 
         UpdateNetworkElementConnectionInput updateInput = new UpdateNetworkElementConnectionInputBuilder().setId(dbId)
-                .setHost(url2).setPort(port2).setIsRequired(false).build();
+                .setHost(url2).setPort(YangHelper2.getLongOrUint32(port2)).setIsRequired(false).build();
         UpdateNetworkElementConnectionOutputBuilder updateOutput = null;
         try {
             updateOutput = dbProvider.updateNetworkElementConnection(updateInput);
@@ -1363,18 +1363,20 @@
                     + "\"implemented-interface\": \"org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Faultlog\",\n"
                     + "\"source-type\": \"Netconf\",\n" + "\"node-id\": \"sim4\",\n" + "\"problem\": \"signalIsLost\"\n"
                     + "}";
-            YangToolsMapper2<Faultlog> yangtoolsMapper = new YangToolsMapper2<>(Faultlog.class,null);
-            FaultlogEntity log = yangtoolsMapper.readValue(jsonString, Faultlog.class);
-            System.out.println(log);
-            System.out.println(yangtoolsMapper.writeValueAsString(log));
+            YangToolsMapper yangtoolsMapper = new YangToolsMapper();
+            Faultlog log = yangtoolsMapper.readValue(jsonString, Faultlog.class);
+            System.out.println(yangtoolsMapper.writeValueAsString((new FaultlogBuilder(log).build())));
+            System.out.println("Check3");
         } catch (IOException e) {
-            fail(e.getMessage());
+            e.printStackTrace();
+            fail("Fail");
         }
 
     }
 
     private Pagination getPagination(long pageSize, int page) {
-        return new PaginationBuilder().setPage(BigInteger.valueOf(page)).setSize(pageSize).build();
+        return new PaginationBuilder().setPage(YangHelper2.getBigIntegerOrUint64(BigInteger.valueOf(page)))
+                .setSize(YangHelper2.getLongOrUint32(pageSize)).build();
     }
 
 
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 6584d05..eaaa311 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
@@ -21,9 +21,10 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
 
+import static org.junit.Assert.fail;
 import java.io.IOException;
 import org.junit.Test;
-import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapper;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapper2;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data;
 
 public class TestDataMappings {
@@ -35,7 +36,7 @@
             + "\"layer-protocol-name\": \"MWPS\",\n"
             + "\"radio-signal-id\": \"Test11\",\n"
             + "\"time-stamp\": \"2017-07-04T14:00:00.0Z\",\n"
-            + "\"granularity-period\": \"PERIOD_15MIN\",\n"
+            + "\"granularity-period\": \"Period15Min\",\n"
             + "\"scanner-id\": \"PM_RADIO_15M_9\",\n"
             + "\"performance-data\": {\n"
             + "\"es\": 0,\n"
@@ -84,14 +85,15 @@
             + "}";
  // @formatter:on
     @Test
-    public void testPmData15m() {
+    public void testPmData15m() throws ClassNotFoundException {
 
-        YangToolsMapper mapper = new YangToolsMapper();
+        YangToolsMapper2<Data> mapper = new YangToolsMapper2<Data>(Data.class, null);
         try {
             Data data = mapper.readValue(PMDATA15M_SERVERDB_JSON.getBytes(), Data.class);
             System.out.println(data);
         } catch (IOException e) {
             e.printStackTrace();
+            fail("Can not parse data");
         }
     }
 
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 95abfdd..7e63c18 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
@@ -40,6 +40,7 @@
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.ElasticSearchDataProvider;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.data.entity.HtDatabaseEventsService;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.NetconfTimeStampImpl;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.YangHelper2;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.test.util.HostInfoForTest;
 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.rev201110.ConnectionLogStatus;
@@ -281,7 +282,7 @@
      * @return
      */
     private static NetworkElementConnectionEntity createNeConnection(String nodeId, NetworkElementDeviceType devType) {
-        return new NetworkElementConnectionBuilder().setNodeId(nodeId).setHost("host").setPort(1234L)
+        return new NetworkElementConnectionBuilder().setNodeId(nodeId).setHost("host").setPort(YangHelper2.getLongOrUint32(1234L))
                 .setCoreModelCapability("123").setStatus(ConnectionLogStatus.Connected).setDeviceType(devType)
                 .setIsRequired(true).build();
     }
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTree.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTree.java
index 294dd43..53c7211 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTree.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestTree.java
@@ -22,7 +22,6 @@
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
 
 import java.io.IOException;
-import java.net.URISyntaxException;
 import java.util.Arrays;
 import java.util.concurrent.TimeUnit;
 import org.apache.sshd.common.util.io.IoUtils;
@@ -43,12 +42,9 @@
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.test.util.HostInfoForTest;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Entity;
 
-/**
- * @author Michael Dürre
- *
- */
 public class TestTree {
 
+    private static String resourceDirectoryPath="/"+TestTree.class.getSimpleName()+"/";
     private static ElasticSearchDataProvider dbProvider;
     private static HtDatabaseClient dbRawProvider;
 
@@ -65,38 +61,29 @@
     }
 
     private static void fillTestData() throws IOException {
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.5.5", getFileContent("/testequipment/1.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.7.0", getFileContent("/testequipment/2.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.55.1.2", getFileContent("/testequipment/3.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.65.1.2", getFileContent("/testequipment/4.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/SHELF-1.1.0.0", getFileContent("/testequipment/5.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.5", getFileContent("/testequipment/6.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.8", getFileContent("/testequipment/7.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.6.5", getFileContent("/testequipment/8.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/ODU-1.56.0.0", getFileContent("/testequipment/9.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.56.1.2", getFileContent("/testequipment/10.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/IDU-1.65.0.0", getFileContent("/testequipment/11.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.65.1.4", getFileContent("/testequipment/12.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.6.0", getFileContent("/testequipment/13.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.8.0", getFileContent("/testequipment/14.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.9.0", getFileContent("/testequipment/15.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.55.1.4", getFileContent("/testequipment/16.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.7", getFileContent("/testequipment/17.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/IDU-1.55.0.0", getFileContent("/testequipment/18.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.1.0", getFileContent("/testequipment/19.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.5.0", getFileContent("/testequipment/20.json"));
-        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.5.6", getFileContent("/testequipment/21.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.5.5", getFileContent("1.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.7.0", getFileContent("2.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.55.1.2", getFileContent("3.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.65.1.2", getFileContent("4.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/SHELF-1.1.0.0", getFileContent("5.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.5", getFileContent("6.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.8", getFileContent("7.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.6.5", getFileContent("8.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/ODU-1.56.0.0", getFileContent("9.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.56.1.2", getFileContent("10.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/IDU-1.65.0.0", getFileContent("11.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.65.1.4", getFileContent("12.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.6.0", getFileContent("13.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.8.0", getFileContent("14.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.9.0", getFileContent("15.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.55.1.4", getFileContent("16.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.1.7", getFileContent("17.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/IDU-1.55.0.0", getFileContent("18.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.1.0", getFileContent("19.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/CARD-1.1.5.0", getFileContent("20.json"));
+        dbRawProvider.doWriteRaw(Entity.Inventoryequipment.getName(), "sim1/a2.module-1.1.5.6", getFileContent("21.json"));
 
     }
-    /**
-     * @param string
-     * @return
-     * @throws URISyntaxException
-     * @throws IOException
-     */
-    private static String getFileContent(String filename) throws IOException {
-        return String.join("\n",IoUtils.readAllLines(TestTree.class.getResourceAsStream(filename)));
-    }
 
     @Test
     public void testInventoryTree() throws IOException {
@@ -148,4 +135,8 @@
         e = DataTreeHttpServlet.getEntity("/tree/read-inventoryequipment-tree/");
         System.out.println(e);
     }
+
+    private static String getFileContent(String filename) throws IOException {
+        return String.join("\n",IoUtils.readAllLines(TestTree.class.getResourceAsStream(resourceDirectoryPath+filename)));
+    }
 }
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 f7ab7c3..3c9d494 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
@@ -28,6 +28,7 @@
 import org.eclipse.jdt.annotation.Nullable;
 import org.json.JSONObject;
 import org.junit.Test;
+import org.onap.ccsdk.features.sdnr.wt.common.YangHelper;
 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;
@@ -37,7 +38,9 @@
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.CreateIndexRequest;
 import org.onap.ccsdk.features.sdnr.wt.common.database.requests.DeleteIndexRequest;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.database.EsDataObjectReaderWriter2;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.YangHelper2;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.test.util.HostInfoForTest;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapperHelper;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapper;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
@@ -284,8 +287,8 @@
 
         ReadPmdata15mListInputBuilder inputBuilder = new ReadPmdata15mListInputBuilder();
         PaginationBuilder paginationBuilder = new PaginationBuilder();
-        paginationBuilder.setPage(new BigInteger("1"));
-        paginationBuilder.setSize(20L);
+        paginationBuilder.setPage(YangHelper2.getBigIntegerOrUint64(new BigInteger("1")));
+        paginationBuilder.setSize(YangHelper2.getLongOrUint32(20L));
         inputBuilder.setPagination(paginationBuilder.build());
 
         ReadPmdata15mListInput input = inputBuilder.build();
@@ -295,8 +298,8 @@
         long page = getPage(input);
         long pageSize = getPageSize(input);
 
-        QueryBuilder query = fromFilter(input.getFilter()).from((page - 1) * pageSize).size(pageSize);
-        setSortOrder(query, input.getSortorder());
+        QueryBuilder query = fromFilter(YangHelper.getList(input.getFilter())).from((page - 1) * pageSize).size(pageSize);
+        setSortOrder(query, YangHelper.getList(input.getSortorder()));
 
         SearchResult<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data> result =
                 pm15mRW.doReadAll(query);
@@ -337,15 +340,15 @@
         out(method());
         String input;
         input = "id-dd-dd";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to " + YangToolsMapperHelper.toCamelCaseAttributeName(input));
         input = "idDdGg";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to " + YangToolsMapperHelper.toCamelCaseAttributeName(input));
         input = "_idDdGg";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to " + YangToolsMapperHelper.toCamelCaseAttributeName(input));
         input = "--ff--gfg";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to " + YangToolsMapperHelper.toCamelCaseAttributeName(input));
         input = "";
-        System.out.println("Map " + input + " to " + YangToolsMapper.toCamelCaseAttributeName(input));
+        System.out.println("Map " + input + " to " + YangToolsMapperHelper.toCamelCaseAttributeName(input));
     }
 
     /* ---------------------------------
@@ -361,7 +364,7 @@
         org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.inventory.list.output.DataBuilder dataBuilder =
                 new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.inventory.list.output.DataBuilder();
         dataBuilder.setDescription(description);
-        dataBuilder.setTreeLevel(treeLevel);
+        dataBuilder.setTreeLevel(YangHelper2.getLongOrUint32(treeLevel));
         return dataBuilder;
     }
 
@@ -429,8 +432,8 @@
             long totalSize) {
         org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Pagination value =
                 new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.PaginationBuilder()
-                        .setPage(BigInteger.valueOf(page)).setSize(pageSize).setTotal(BigInteger.valueOf(totalSize))
-                        .build();
+                .setPage(YangHelper2.getBigIntegerOrUint64(BigInteger.valueOf(page))).setSize(YangHelper2.getLongOrUint32(pageSize))
+                .setTotal(YangHelper2.getBigIntegerOrUint64(BigInteger.valueOf(totalSize))).build();
         outputBuilder.setPagination(value);
     }
 
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangGenSalMappingOpenRoadm.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangGenSalMappingOpenRoadm.java
index 0a195e0..56df628 100644
--- a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangGenSalMappingOpenRoadm.java
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/TestYangGenSalMappingOpenRoadm.java
@@ -21,47 +21,130 @@
  */
 package org.onap.ccsdk.features.sdnr.wt.dataprovider.test;
 
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 import java.io.IOException;
+import java.util.Arrays;
+import java.util.Map;
+import org.apache.sshd.common.util.io.IoUtils;
+import org.eclipse.jdt.annotation.Nullable;
 import org.jline.utils.Log;
 import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.types.YangHelper2;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapper;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.yangtools.YangToolsMapper2;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev191129.PmDataType;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.pm.types.rev191129.PmDataTypeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.BIPErrorCounter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.OpticalPowerInputOSCMin;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.GranularityPeriodType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.PmdataEntity;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.PmdataEntityBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata.entity.PerformanceData;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata.entity.PerformanceDataBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata.grp.Measurement;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata.grp.MeasurementBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata.grp.MeasurementKey;
+import org.opendaylight.yangtools.yang.common.Uint64;
 
-public class TestYangGenSalMappingOpenRoadm {
+public class TestYangGenSalMappingOpenRoadm extends Mockito {
+
+    private static String resourceDirectoryPath = "/" + TestYangGenSalMappingOpenRoadm.class.getSimpleName() + "/";
 
     @Test
-    public void testOpenroadmPM() throws IOException, ClassNotFoundException {
-        out(method());
-        // @formatter:off
-        String jsonString = "{\n"
-                + "    \"time-stamp\":\"2020-09-24T22:59:48.6Z\", \n"
-                + "    \"node-name\":\"Rdm-1\",\n"
-                + "    \"uuid-interface\":\"physical-link\",\n"
-                + "    \"scanner-id\":\"ryyyyyyyryryr\",\n"
-                + "    \"granularity-period\":\"Period24Hours\",\n"
-                + "    \"performance-data\":{\n"
-                + "         \"measurement\":[{\n"
-                + "            \"pm-value\":{\"uint64\":1464170942461338033},\n"
-                + "            \"pm-key\":\"org.opendaylight"
-                + ".yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.OpticalPowerInputOSCMin\"\n"
-                + "         }]\n"
-                + "        }\n"
-                + "}\n";
-        // @formatter:on
-        // Map to JSON String to Object
-        PmDataTypeBuilder builder = new PmDataTypeBuilder();
-        builder.setInt64("10");
-        PmDataType pmDataType = builder.build();
-        out("Result is: "+pmDataType);
+    public void testOpenroadmPMBuilder() throws IOException, ClassNotFoundException {
+        out("Test: " + method());
 
-        YangToolsMapper2<PmdataEntity> mapper2 = new YangToolsMapper2<>(PmdataEntity.class, null);
-        out("Created mapper");
+        MeasurementBuilder measurementBuilder1 = new MeasurementBuilder();
+        measurementBuilder1.setPmKey(OpticalPowerInputOSCMin.class);
+        measurementBuilder1.setPmValue(new PmDataType(Uint64.valueOf(64L)));
+        Measurement measurement1 = measurementBuilder1.build();
+
+        MeasurementBuilder measurementBuilder2 = new MeasurementBuilder();
+        measurementBuilder2.setPmKey(BIPErrorCounter.class);
+        measurementBuilder2.setPmValue(new PmDataType(Uint64.valueOf(65L)));
+        Measurement measurement2 = measurementBuilder2.build();
+
+        PerformanceDataBuilder performanceDataBuilder = new PerformanceDataBuilder();
+        performanceDataBuilder.setMeasurement(
+                YangHelper2.getListOrMap(MeasurementKey.class, Arrays.asList(measurement1, measurement2)));
+
+        PmdataEntityBuilder pmDataEntitybuilder = new PmdataEntityBuilder();
+        pmDataEntitybuilder.setPerformanceData(performanceDataBuilder.build());
+
+        PmdataEntity pmDataType = pmDataEntitybuilder.build();
+
+        YangToolsMapper mapper2 = new YangToolsMapper();
+        String jsonString = mapper2.writeValueAsString(pmDataType);
+        out("Result json after mapping: " + jsonString);
+
         PmdataEntity generatepmdNode = mapper2.readValue(jsonString.getBytes(), PmdataEntity.class);
+        out("Original: " + pmDataType.toString());
+        out("Mapped  : " + generatepmdNode.toString());
+        assertTrue("Can mapping not working", generatepmdNode.equals(pmDataType));
+    }
+
+    @Test
+    public void testOpenroadmPMString1() throws IOException, ClassNotFoundException {
+        out("Test: " + method());
+        String jsonString2 = getFileContent("pmdata1.json");
+        YangToolsMapper mapper2 = new YangToolsMapper();
+        PmdataEntity generatepmdNode = mapper2.readValue(jsonString2.getBytes(), PmdataEntity.class);
+        out("String1:"+generatepmdNode.toString()); // Print it with specified indentation
+        assertTrue("GranularityPeriod", generatepmdNode.getGranularityPeriod().equals(GranularityPeriodType.Period15Min));
+        assertTrue("NodeName", generatepmdNode.getNodeName().equals("NTS_RDM2"));
+        @Nullable PerformanceData performanceData = generatepmdNode.getPerformanceData();
+        assertNotNull("PerformanceData", performanceData);
+        @Nullable Map<MeasurementKey, Measurement> measurement = performanceData.getMeasurement();
+        assertNotNull("Measurement", measurement);
+        Measurement measurement1 = measurement.get(new MeasurementKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.OpticalPowerInputOSCMin.class));
+        assertTrue("Measurement=64", measurement1.getPmValue().stringValue().equals("64"));
+    }
+
+    @Test
+    public void testOpenroadmPMString2() throws IOException, ClassNotFoundException {
+        out("Test: " + method());
+        String jsonString2 = getFileContent("pmdata2.json");
+        YangToolsMapper mapper2 = new YangToolsMapper();
+        PmdataEntity generatepmdNode = mapper2.readValue(jsonString2.getBytes(), PmdataEntity.class);
         out(generatepmdNode.toString()); // Print it with specified indentation
     }
 
+    @Test
+    public void testOpenroadmPMString3() throws IOException, ClassNotFoundException {
+        out("Test: " + method());
+        String jsonString2 = getFileContent("pmdata3.json");
+        YangToolsMapper2<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data> mapper2 =
+                new YangToolsMapper2<>(
+                        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data.class,
+                        null);
+        PmdataEntity generatepmdNode = mapper2.readValue(jsonString2.getBytes(), PmdataEntity.class);
+        out(generatepmdNode.toString()); // Print it with specified indentation
+    }
+
+
+    @Test
+    public void testOpenroadmPMString4() throws IOException, ClassNotFoundException {
+        out("Test: " + method());
+        String jsonString = getFileContent("pmdata3.json");
+        YangToolsMapper2<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data> mapper =
+                new YangToolsMapper2<>(
+                        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data.class,
+                        null);
+        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data data =
+                mapper.readValue(jsonString.getBytes(),
+                        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.read.pmdata._15m.list.output.Data.class);
+
+        assertTrue("GranularityPeriod", data.getGranularityPeriod().equals(GranularityPeriodType.Period15Min));
+        assertTrue("NodeName", data.getNodeName().equals("openroadm1"));
+        org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.pmdata15m.entity.@Nullable PerformanceData performanceData =
+                data.getPerformanceData();
+        assertNotNull("PerformanceData", performanceData);
+        @Nullable Map<MeasurementKey, Measurement> measurement = performanceData.getMeasurement();
+        assertNotNull("Measurement", measurement);
+        Measurement measurement1 = measurement.get(new MeasurementKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.DelayTCM2Up.class));
+        assertTrue("Measurement=11298624220985537708", measurement1.getPmValue().stringValue().equals("11298624220985537708"));
+    }
     /*
      * --------------------------------- Private
      */
@@ -72,9 +155,12 @@
     }
 
     private static void out(String text) {
-        System.out.println("----------------------");
-        System.out.println(text);
-        Log.info("Log: "+text);
+        Log.info("Log: " + text);
+    }
+
+    private static String getFileContent(String filename) throws IOException {
+        return String.join("\n",
+                IoUtils.readAllLines(TestTree.class.getResourceAsStream(resourceDirectoryPath + filename)));
     }
 
 }
diff --git a/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/issues/TestIssue227.java b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/issues/TestIssue227.java
new file mode 100644
index 0000000..9cfc3ea
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/test/issues/TestIssue227.java
@@ -0,0 +1,126 @@
+/*
+ * ============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.dataprovider.test.issues;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import java.io.IOException;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.opendaylight.yangtools.yang.common.Uint32;
+
+public class TestIssue227 extends Mockito {
+
+    static String inputJsonString = "{\"value1\":\"forty-two\", \"value2\":\"forty-three\"}";
+    static String inputJsonNumber = "{\"value1\":42, \"value2\":43}";
+
+    @Test
+    public void testWithException() {
+        String inputJson = inputJsonNumber;
+        System.out.println("Input " + inputJson);
+
+        ObjectMapper mapper = new ObjectMapper();
+        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
+
+        doMapping(mapper, inputJson);
+    }
+
+    @Test
+    public void testWithMixin() {
+        String inputJson = inputJsonNumber;
+        System.out.println("Input " + inputJson);
+
+        ObjectMapper mapper = new ObjectMapper();
+        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
+        mapper.addMixIn(TestBuilder.class, IgnoreFooSetValueIntMixIn.class);
+
+        doMapping(mapper, inputJson);
+    }
+
+
+    private void doMapping(ObjectMapper mapper, String json) {
+        TestBuilder foo;
+        try {
+            foo = mapper.readValue(json.getBytes(), TestBuilder.class);
+            System.out.println("Foo " + foo);
+            System.out.println(mapper.writeValueAsString(foo));
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    static class TestBuilder {
+
+        private String value1;
+        private String value2;
+
+        String getValue1() {
+            return value1;
+        }
+
+        public void setValue1(String value) {
+            this.value1 = value;
+        }
+
+        public void setValue1(int value) {
+            this.value1 = String.valueOf(value);
+        }
+
+        public void setValue1(long value) {
+            this.value1 = String.valueOf(value);
+        }
+
+        public void setValue1(Uint32 value) {
+            this.value1 = String.valueOf(value);
+        }
+
+        public String getValue2() {
+            return value2;
+        }
+
+        public void setValue2(String value) {
+            this.value2 = value;
+        }
+
+        public void setValue2(int value) {
+            this.value2 = String.valueOf(value);
+        }
+
+        @Override
+        public String toString() {
+            return "Foo [value1=" + value1 + ", value2=" + value2 + "]";
+        }
+
+    }
+
+
+    private abstract class IgnoreFooSetValueIntMixIn {
+        @JsonProperty
+        public abstract void setValue1(String value);
+
+        @JsonProperty
+        public abstract void setValue2(String value);
+    }
+}
+
+
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/1.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/1.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/1.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/1.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/10.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/10.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/10.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/10.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/11.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/11.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/11.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/11.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/12.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/12.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/12.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/12.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/13.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/13.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/13.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/13.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/14.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/14.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/14.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/14.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/15.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/15.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/15.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/15.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/16.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/16.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/16.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/16.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/17.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/17.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/17.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/17.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/18.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/18.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/18.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/18.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/19.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/19.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/19.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/19.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/2.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/2.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/2.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/2.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/20.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/20.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/20.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/20.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/21.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/21.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/21.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/21.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/3.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/3.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/3.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/3.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/4.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/4.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/4.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/4.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/5.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/5.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/5.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/5.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/6.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/6.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/6.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/6.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/7.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/7.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/7.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/7.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/8.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/8.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/8.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/8.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/testequipment/9.json b/sdnr/wt/data-provider/provider/src/test/resources/TestTree/9.json
similarity index 100%
rename from sdnr/wt/data-provider/provider/src/test/resources/testequipment/9.json
rename to sdnr/wt/data-provider/provider/src/test/resources/TestTree/9.json
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata1.json b/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata1.json
new file mode 100644
index 0000000..aa3a1cc
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata1.json
@@ -0,0 +1,18 @@
+{
+	"performance-data": {
+		"measurement": [
+			{
+				"pm-key": "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.OpticalPowerInputOSCMin",
+				"pm-value": "64"
+			},
+			{
+				"pm-key": "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.BIPErrorCounter",
+				"pm-value": "65"
+			}
+		]
+	},
+	"uuid-interface": "device",
+	"granularity-period": "Period15Min",
+	"time-stamp": "2020-11-24T14:57:29.6Z",
+	"node-name": "NTS_RDM2"
+}
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata2.json b/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata2.json
new file mode 100644
index 0000000..d784cf0
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata2.json
@@ -0,0 +1,14 @@
+{
+	"performance-data": {
+		"measurement": [
+			{
+				"pm-key": "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.CodeViolations",
+				"pm-value": "11298624220985537708"
+			}
+		]
+	},
+	"uuid-interface": "device",
+	"granularity-period": "Period15Min",
+	"time-stamp": "2020-11-24T14:57:29.6Z",
+	"node-name": "NTS_RDM2"
+}
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata3.json b/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata3.json
new file mode 100644
index 0000000..0747e31
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/resources/TestYangGenSalMappingOpenRoadm/pmdata3.json
@@ -0,0 +1,14 @@
+{
+	"performance-data": {
+		"measurement": [
+			{
+				"pm-key": "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.openroadm.pm.types.rev200413.DelayTCM2Up",
+				"pm-value": "11298624220985537708"
+			}
+		]
+	},
+	"uuid-interface": "shared-risk-group",
+	"granularity-period": "Period15Min",
+	"time-stamp": "2020-10-24T08:17:02.5Z",
+	"node-name": "openroadm1"
+}
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/log4j.properties b/sdnr/wt/data-provider/provider/src/test/resources/log4j.properties
new file mode 100644
index 0000000..e4fcb01
--- /dev/null
+++ b/sdnr/wt/data-provider/provider/src/test/resources/log4j.properties
@@ -0,0 +1,9 @@
+# Set root logger level to DEBUG and its only appender to A1.
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender.
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+# A1 uses PatternLayout.
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
\ No newline at end of file
diff --git a/sdnr/wt/data-provider/provider/src/test/resources/simplelogger.properties b/sdnr/wt/data-provider/provider/src/test/resources/simplelogger.properties
deleted file mode 100644
index 85525bf..0000000
--- a/sdnr/wt/data-provider/provider/src/test/resources/simplelogger.properties
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# ============LICENSE_START=======================================================
-# ONAP : ccsdk features
-# ================================================================================
-# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=======================================================
-#
-#
-# SLF4J's SimpleLogger configuration file
-# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
-
-# Default logging detail level for all instances of SimpleLogger.
-# Must be one of ("trace", "debug", "info", "warn", or "error").
-# If not specified, defaults to "info".
-org.slf4j.simpleLogger.defaultLogLevel=debug
-org.slf4j.simpleLogger.showDateTime=true
-
-org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
-org.slf4j.simpleLogger.showThreadName=true
-org.slf4j.simpleLogger.showLogName=true
-org.slf4j.simpleLogger.showShortLogName=false
-org.slf4j.simpleLogger.org.onap.ccsdk.features.sdnr.wt.dataprovider=DEBUG
-org.slf4j.simpleLogger.org.onap.ccsdk.features.sdnr.wt.common=DEBUG
-
