Remove deprecated Yin/YangStatementSourceImpl
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / YangParserWithContextTest.java
index 6fdd1ff4386f4cb732c4bb41d2a8638eb4986305..be8c883d0866d02653fe1532dfb28c6401687934 100644 (file)
@@ -373,10 +373,7 @@ public class YangParserWithContextTest {
         final StatementStreamSource test3 = sourceForResource("/context-augment-test/test3.yang");
 
         final SchemaContext context = TestUtils.parseYangSources(resource, test1, test2, test3);
-        final Set<Module> modules = context.getModules();
-        assertNotNull(modules);
-
-        final Module t4 = TestUtils.findModule(modules, "test4");
+        final Module t4 = TestUtils.findModule(context, "test4").get();
         final ContainerSchemaNode interfaces = (ContainerSchemaNode) t4.getDataChildByName(QName.create(
                 t4.getQNameModule(), "interfaces"));
         final ListSchemaNode ifEntry = (ListSchemaNode) interfaces.getDataChildByName(QName.create(t4.getQNameModule(),