Use ControllerContext non-statically
[netconf.git] / restconf / restconf-nb-bierman02 / src / test / java / org / opendaylight / controller / sal / restconf / impl / json / to / nn / test / JsonLeafrefToNnTest.java
index f0bfa63d348670a532f5afdbba7da4873b022b8d..d25e36101202cc09eace5a187e87ad2a30d80708 100644 (file)
@@ -25,15 +25,14 @@ public class JsonLeafrefToNnTest extends AbstractBodyReaderTest {
     private final JsonNormalizedNodeBodyReader jsonBodyReader;
     private static SchemaContext schemaContext;
 
-    public JsonLeafrefToNnTest() throws NoSuchFieldException, SecurityException {
-        this.jsonBodyReader = new JsonNormalizedNodeBodyReader();
+    public JsonLeafrefToNnTest() {
+        super(schemaContext, null);
+        this.jsonBodyReader = new JsonNormalizedNodeBodyReader(controllerContext);
     }
 
     @BeforeClass
     public static void initialize() {
-        schemaContext = schemaContextLoader("/json-to-nn/leafref",
-                schemaContext);
-        CONTROLLER_CONTEXT.setSchemas(schemaContext);
+        schemaContext = schemaContextLoader("/json-to-nn/leafref", schemaContext);
     }
 
     @Test