Replace old yang parser usages in restconf
[netconf.git] / restconf / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / test / RestPostOperationTest.java
index 27e1ef55404736a8fc0ee651995821c479e44a57..4983b7cac40295bf047fac39d91a65535dcf1be3 100644 (file)
@@ -14,7 +14,6 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 import static org.opendaylight.controller.sal.restconf.impl.test.RestOperationUtils.XML;
-
 import com.google.common.base.Optional;
 import com.google.common.collect.ImmutableList;
 import com.google.common.util.concurrent.CheckedFuture;
@@ -52,6 +51,7 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 
 public class RestPostOperationTest extends JerseyTest {
 
@@ -72,15 +72,15 @@ public class RestPostOperationTest extends JerseyTest {
     private static DOMMountPointService mountService;
 
     @BeforeClass
-    public static void init() throws URISyntaxException, IOException {
+    public static void init() throws URISyntaxException, IOException, ReactorException {
         schemaContextYangsIetf = TestUtils.loadSchemaContext("/full-versions/yangs");
         schemaContextTestModule = TestUtils.loadSchemaContext("/full-versions/test-module");
         brokerFacade = mock(BrokerFacade.class);
         restconfImpl = RestconfImpl.getInstance();
         restconfImpl.setBroker(brokerFacade);
 
-        final Set<Module> modules = TestUtils.loadModulesFrom("/test-config-data/yang1");
-        schemaContext = TestUtils.loadSchemaContext(modules);
+        schemaContext = TestUtils.loadSchemaContext("/test-config-data/yang1");
+        final Set<Module> modules = schemaContext.getModules();
 
         loadData();
     }