Use ControllerContext non-statically
[netconf.git] / restconf / restconf-nb-bierman02 / src / test / java / org / opendaylight / controller / sal / restconf / impl / nn / to / json / test / NnJsonChoiceCaseTest.java
index c83261e0285d1e8ba91f85e2cbed39fd7ffcd55a..43e950c9e9980748154a0c4a3f34fb2238e1d5e2 100644 (file)
@@ -26,15 +26,14 @@ public class NnJsonChoiceCaseTest extends AbstractBodyReaderTest {
     private static SchemaContext schemaContext;
     private final NormalizedNodeJsonBodyWriter jsonBodyWriter;
 
-    public NnJsonChoiceCaseTest() throws NoSuchFieldException,
-            SecurityException {
+    public NnJsonChoiceCaseTest()  {
+        super(schemaContext, null);
         jsonBodyWriter = new NormalizedNodeJsonBodyWriter();
     }
 
     @BeforeClass
     public static void initialization() {
         schemaContext = schemaContextLoader("/nn-to-json/choice", schemaContext);
-        CONTROLLER_CONTEXT.setSchemas(schemaContext);
     }
 
     /**
@@ -167,7 +166,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,