Update MRI projects for Aluminium
[netconf.git] / restconf / restconf-nb-bierman02 / src / test / java / org / opendaylight / controller / sal / restconf / impl / nn / to / json / test / NnToJsonLeafrefType.java
index 00dd603ce6e610a22a587f226a1d8a2f89813ebe..85a09ab2d23449e4ce0e416cc80a6447d7c9efc3 100644 (file)
@@ -20,24 +20,22 @@ import org.junit.Test;
 import org.opendaylight.controller.md.sal.rest.common.TestRestconfUtils;
 import org.opendaylight.controller.sal.rest.impl.test.providers.AbstractBodyReaderTest;
 import org.opendaylight.netconf.sal.rest.impl.NormalizedNodeJsonBodyWriter;
-import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.restconf.common.context.NormalizedNodeContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 
 public class NnToJsonLeafrefType extends AbstractBodyReaderTest {
 
-    private static SchemaContext schemaContext;
+    private static EffectiveModelContext schemaContext;
     private final NormalizedNodeJsonBodyWriter jsonBodyWriter;
 
-    public NnToJsonLeafrefType() throws NoSuchFieldException, SecurityException {
-        super();
+    public NnToJsonLeafrefType() {
+        super(schemaContext, null);
         jsonBodyWriter = new NormalizedNodeJsonBodyWriter();
     }
 
     @BeforeClass
     public static void initialization() {
-        schemaContext = schemaContextLoader("/nn-to-json/leafref",
-                schemaContext);
-        CONTROLLER_CONTEXT.setSchemas(schemaContext);
+        schemaContext = schemaContextLoader("/nn-to-json/leafref", schemaContext);
     }
 
     @Test
@@ -92,7 +90,7 @@ public class NnToJsonLeafrefType extends AbstractBodyReaderTest {
         final String pathToInputFile = xmlDataPath;
 
         final NormalizedNodeContext testNN = TestRestconfUtils
-                .loadNormalizedContextFromXmlFile(pathToInputFile, uri);
+                .loadNormalizedContextFromXmlFile(pathToInputFile, uri, controllerContext);
 
         final OutputStream output = new ByteArrayOutputStream();
         jsonBodyWriter.writeTo(testNN, null, null, null, mediaType, null,