Update MRI projects for Aluminium
[netconf.git] / restconf / restconf-nb-bierman02 / src / test / java / org / opendaylight / controller / sal / rest / impl / test / providers / TestJsonPatchBodyReader.java
index 7aa7d7ff038742f50de54ccd87f67b72664c780a..d1c23ed6bd209fed3744a99e59a7c7ee2c3e265d 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.rest.impl.test.providers;
 
 import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
@@ -17,18 +16,18 @@ import javax.ws.rs.core.MediaType;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.netconf.sal.rest.impl.JsonToPatchBodyReader;
-import org.opendaylight.netconf.sal.restconf.impl.PatchContext;
 import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.restconf.common.patch.PatchContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 
 public class TestJsonPatchBodyReader extends AbstractBodyReaderTest {
 
     private final JsonToPatchBodyReader jsonToPatchBodyReader;
-    private static SchemaContext schemaContext;
+    private static EffectiveModelContext schemaContext;
 
-    public TestJsonPatchBodyReader() throws NoSuchFieldException, SecurityException {
-        super();
-        jsonToPatchBodyReader = new JsonToPatchBodyReader();
+    public TestJsonPatchBodyReader() {
+        super(schemaContext, null);
+        jsonToPatchBodyReader = new JsonToPatchBodyReader(controllerContext);
     }
 
     @Override
@@ -39,7 +38,6 @@ public class TestJsonPatchBodyReader extends AbstractBodyReaderTest {
     @BeforeClass
     public static void initialization() {
         schemaContext = schemaContextLoader("/instanceidentifier/yang", schemaContext);
-        CONTROLLER_CONTEXT.setSchemas(schemaContext);
     }
 
     @Test