Revert "Remove SchemaNode#getPath from XML writer test in rfc8040"
[netconf.git] / restconf / restconf-nb-rfc8040 / src / test / java / org / opendaylight / restconf / nb / rfc8040 / jersey / providers / XmlNormalizedNodeBodyWriterTest.java
index af665e85b5e6a2b6dea807be5b0da020318fce96..7d0b37d4d27bc00405d34c08bae58164f994028e 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.restconf.nb.rfc8040.jersey.providers;
 
 import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
 import java.io.ByteArrayOutputStream;
@@ -24,6 +25,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
+import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 
 public class XmlNormalizedNodeBodyWriterTest {
     @Test
@@ -31,6 +33,7 @@ public class XmlNormalizedNodeBodyWriterTest {
         final EffectiveModelContext schemaContext = mock(EffectiveModelContext.class);
 
         final SchemaNode schemaNode = mock(SchemaNode.class);
+        doReturn(SchemaPath.ROOT).when(schemaNode).getPath();
 
         final NormalizedNodePayload nodePayload = NormalizedNodePayload.of(
             new InstanceIdentifierContext<>(YangInstanceIdentifier.empty(), schemaNode, null, schemaContext),
@@ -50,6 +53,7 @@ public class XmlNormalizedNodeBodyWriterTest {
                 TestRestconfUtils.loadSchemaContext("/instanceidentifier/yang", null);
 
         final SchemaNode schemaNode = mock(SchemaNode.class);
+        doReturn(SchemaPath.ROOT).when(schemaNode).getPath();
 
         final NormalizedNodePayload nodePayload = NormalizedNodePayload.of(
             new InstanceIdentifierContext<>(YangInstanceIdentifier.empty(), schemaNode, null, schemaContext),