sal-rest-connector test refactoring
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / cnsn / to / json / test / CnSnToJsonLeafrefType.java
index 6a92ebdf1b56a979c556294e04e9ee9a65294409..3215e8171929ce8cc2111aea13af65ffbf56281f 100644 (file)
@@ -12,6 +12,7 @@ import javax.ws.rs.WebApplicationException;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider;
+import org.opendaylight.controller.sal.rest.impl.XmlToCompositeNodeProvider;
 import org.opendaylight.controller.sal.restconf.impl.test.TestUtils;
 import org.opendaylight.controller.sal.restconf.impl.test.YangAndXmlAndDataSchemaLoader;
 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
@@ -90,7 +91,7 @@ public class CnSnToJsonLeafrefType extends YangAndXmlAndDataSchemaLoader {
 
     private String toJson(String xmlDataPath) {
         try {
-            CompositeNode compositeNode = TestUtils.loadCompositeNode(xmlDataPath);
+            CompositeNode compositeNode = TestUtils.readInputToCnSn(xmlDataPath, XmlToCompositeNodeProvider.INSTANCE);
             TestUtils.normalizeCompositeNode(compositeNode, modules, searchedModuleName + ":" + searchedDataSchemaName);
             return TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, dataSchemaNode,
                     StructuredDataToJsonProvider.INSTANCE);