Adjust to yangtools-2.0.0/odlparent-3.0.0 changes
[netconf.git] / restconf / restconf-nb-rfc8040 / src / test / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / CreateStreamUtilTest.java
index a268b1b4c8b2c17e8488c739e599a51b10f452cd..97dde3fdd5456d3949ed2beb64b6ca06da4e4c7f 100644 (file)
@@ -50,7 +50,7 @@ public class CreateStreamUtilTest {
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
         this.refSchemaCtx = new SchemaContextRef(
-                YangParserTestUtils.parseYangSources(TestRestconfUtils.loadFiles(PATH_FOR_NEW_SCHEMA_CONTEXT)));
+                YangParserTestUtils.parseYangFiles(TestRestconfUtils.loadFiles(PATH_FOR_NEW_SCHEMA_CONTEXT)));
     }
 
     @Test
@@ -82,8 +82,7 @@ public class CreateStreamUtilTest {
     private NormalizedNodeContext prepareDomPayload(final String rpcName, final String inputOutput,
             final String toasterValue, final String inputOutputName) {
         final SchemaContext schema = this.refSchemaCtx.get();
-        final Module rpcModule = schema.findModuleByName("sal-remote", null);
-        assertNotNull(rpcModule);
+        final Module rpcModule = schema.findModules("sal-remote").iterator().next();
         final QName rpcQName = QName.create(rpcModule.getQNameModule(), rpcName);
         final QName rpcInputQName = QName.create(rpcModule.getQNameModule(), inputOutput);
         final Set<RpcDefinition> setRpcs = rpcModule.getRpcs();
@@ -111,8 +110,8 @@ public class CreateStreamUtilTest {
         } else {
             o = toasterValue;
         }
-        final LeafNode<Object> lfNode = (Builders.leafBuilder((LeafSchemaNode) lfSchemaNode)
-                .withValue(o)).build();
+        final LeafNode<Object> lfNode = Builders.leafBuilder((LeafSchemaNode) lfSchemaNode)
+                .withValue(o).build();
         container.withChild(lfNode);
 
         return new NormalizedNodeContext(new InstanceIdentifierContext<>(null, rpcInputSchemaNode, null, schema),