Merge "BUG-1281: use SchemaContext lookups"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / cnsn / to / json / test / CnSnToJsonIncorrectTopLevelTest.java
index 50c834b1ffee46f96787d73ac47c9f6e49d6ffd4..3bd600dbf1a5b28335c0486add9145cef1cfda16 100644 (file)
@@ -21,7 +21,7 @@ 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.common.QName;
-import org.opendaylight.yangtools.yang.data.api.CompositeNode;
+import org.opendaylight.yangtools.yang.data.api.Node;
 import org.opendaylight.yangtools.yang.model.api.ConstraintDefinition;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
@@ -145,16 +145,15 @@ public class CnSnToJsonIncorrectTopLevelTest extends YangAndXmlAndDataSchemaLoad
     @Test
     public void incorrectTopLevelElementTest() {
 
-        CompositeNode compositeNode = TestUtils.readInputToCnSn("/cnsn-to-json/simple-data-types/xml/data.xml",
-                XmlToCompositeNodeProvider.INSTANCE);
+        Node<?> node = TestUtils.readInputToCnSn("/cnsn-to-json/simple-data-types/xml/data.xml", XmlToCompositeNodeProvider.INSTANCE);
         DataSchemaNode incorrectDataSchema = null;
         incorrectDataSchema = new IncorrectDataSchema();
 
-        TestUtils.normalizeCompositeNode(compositeNode, modules, "simple-data-types:cont");
+        TestUtils.normalizeCompositeNode(node, modules, "simple-data-types:cont");
 
         boolean exceptionRaised = false;
         try {
-            TestUtils.writeCompNodeWithSchemaContextToOutput(compositeNode, modules, incorrectDataSchema,
+            TestUtils.writeCompNodeWithSchemaContextToOutput(node, modules, incorrectDataSchema,
                     StructuredDataToJsonProvider.INSTANCE);
         } catch (UnsupportedDataTypeException e) {
             exceptionRaised = true;