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