Use ControllerContext non-statically
[netconf.git] / restconf / restconf-nb-bierman02 / src / test / java / org / opendaylight / controller / sal / restconf / impl / nn / to / json / test / NnToJsonWithAugmentTest.java
index 0aadde5a78e5ebce0143ada85b5a12e77b95e881..0623a07be5357ab2f23b22527b1c6e70969570ce 100644 (file)
@@ -29,16 +29,14 @@ public class NnToJsonWithAugmentTest extends AbstractBodyReaderTest {
     private static SchemaContext schemaContext;
     private final NormalizedNodeJsonBodyWriter xmlBodyWriter;
 
-    public NnToJsonWithAugmentTest() throws NoSuchFieldException,
-            SecurityException {
+    public NnToJsonWithAugmentTest() {
+        super(schemaContext, null);
         xmlBodyWriter = new NormalizedNodeJsonBodyWriter();
     }
 
     @BeforeClass
     public static void initialize() {
-        schemaContext = schemaContextLoader("/nn-to-json/augmentation",
-                schemaContext);
-        CONTROLLER_CONTEXT.setSchemas(schemaContext);
+        schemaContext = schemaContextLoader("/nn-to-json/augmentation", schemaContext);
     }
 
     @Test
@@ -48,7 +46,7 @@ public class NnToJsonWithAugmentTest extends AbstractBodyReaderTest {
         final String pathToInputFile = "/nn-to-json/augmentation/xml/data.xml";
 
         final NormalizedNodeContext testNN = TestRestconfUtils
-                .loadNormalizedContextFromXmlFile(pathToInputFile, uri);
+                .loadNormalizedContextFromXmlFile(pathToInputFile, uri, controllerContext);
 
         final OutputStream output = new ByteArrayOutputStream();
         xmlBodyWriter