Add DatabindContext and its wiring
[netconf.git] / restconf / restconf-nb / src / test / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / RestconfOperationsServiceTest.java
index e65a8cdbba9550c9864a078bc6f7bf8efcf1fd49..dbf41112073e008a3dd167cb131b3b8143171e58 100644 (file)
@@ -16,16 +16,15 @@ import org.junit.runner.RunWith;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
 import org.opendaylight.restconf.nb.rfc8040.TestRestconfUtils;
-import org.opendaylight.restconf.nb.rfc8040.TestUtils;
+import org.opendaylight.restconf.nb.rfc8040.databind.DatabindContext;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 
 @RunWith(MockitoJUnitRunner.StrictStubs.class)
 public class RestconfOperationsServiceTest {
     @Test
     public void getOperationsTest() throws IOException {
-        final var oper = new RestconfOperationsServiceImpl(
-            TestUtils.newSchemaContextHandler(
-                YangParserTestUtils.parseYangFiles(TestRestconfUtils.loadFiles("/modules"))),
+        final var context = YangParserTestUtils.parseYangFiles(TestRestconfUtils.loadFiles("/modules"));
+        final var oper = new RestconfOperationsServiceImpl(() -> DatabindContext.ofModel(context),
             mock(DOMMountPointService.class));
 
         assertEquals("{\n"