Hide AbstractGet
[netconf.git] / netconf / mdsal-netconf-connector / src / test / java / org / opendaylight / netconf / mdsal / connector / ops / get / Netconf538Test.java
index b01c561b5b3c7fcf117db51fc22bd1371b8c61e3..656bb0580e3321066b022fbc9c323924b522822d 100644 (file)
@@ -25,7 +25,6 @@ import org.opendaylight.yangtools.yang.data.api.schema.LeafNode;
 import org.opendaylight.yangtools.yang.data.api.schema.MapNode;
 import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
 import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
@@ -40,10 +39,8 @@ public class Netconf538Test {
     private TransactionProvider transactionProvider;
 
     @Test
-    public void transformNormalizedNodeTest_mapNodeTest() throws Exception {
-
-        final SchemaContext context = YangParserTestUtils.parseYangResources(Netconf538Test.class,
-                "/yang/simple-list.yang");
+    public void testRootMap() throws Exception {
+        final var context = YangParserTestUtils.parseYangResources(Netconf538Test.class, "/yang/simple-list.yang");
         final CurrentSchemaContext currentContext = mock(CurrentSchemaContext.class);
         doReturn(context).when(currentContext).getCurrentContext();
 
@@ -62,7 +59,7 @@ public class Netconf538Test {
                 .build())
             .build();
 
-        final Node node = getConfig.transformNormalizedNode(document, data, YangInstanceIdentifier.of(BASE));
+        final Node node = getConfig.serializeNodeWithParentStructure(document, YangInstanceIdentifier.of(BASE), data);
 
         assertNotNull(node);
         Node nodeUser = node.getFirstChild();