Update MRI projects for Aluminium
[netconf.git] / restconf / restconf-nb-bierman02 / src / test / java / org / opendaylight / controller / sal / restconf / impl / nn / to / json / test / NnJsonChoiceCaseTest.java
index 2345451bbbac6022c621dad9d48c5914db76c60b..dca57eda148e0cc15b8f0161d9b5703917f1e117 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.sal.restconf.impl.nn.to.json.test;
 
 import static org.junit.Assert.assertTrue;
@@ -19,23 +18,21 @@ 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.restconf.common.context.NormalizedNodeContext;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 
 public class NnJsonChoiceCaseTest extends AbstractBodyReaderTest {
 
-    private static SchemaContext schemaContext;
+    private static EffectiveModelContext schemaContext;
     private final NormalizedNodeJsonBodyWriter jsonBodyWriter;
 
-    public NnJsonChoiceCaseTest() throws NoSuchFieldException,
-            SecurityException {
-        super();
+    public NnJsonChoiceCaseTest()  {
+        super(schemaContext, null);
         jsonBodyWriter = new NormalizedNodeJsonBodyWriter();
     }
 
     @BeforeClass
     public static void initialization() {
         schemaContext = schemaContextLoader("/nn-to-json/choice", schemaContext);
-        CONTROLLER_CONTEXT.setSchemas(schemaContext);
     }
 
     /**
@@ -168,7 +165,7 @@ public class NnJsonChoiceCaseTest extends AbstractBodyReaderTest {
     private String getJson(final String xmlPath) throws Exception {
         final String uri = "choice-case-test:cont";
         final NormalizedNodeContext testNN = TestRestconfUtils
-                .loadNormalizedContextFromXmlFile(xmlPath, uri);
+                .loadNormalizedContextFromXmlFile(xmlPath, uri, controllerContext);
 
         final OutputStream output = new ByteArrayOutputStream();
         jsonBodyWriter.writeTo(testNN, null, null, null, mediaType, null,