BUG-4688: Rework SchemaContext module lookups
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / IdentityStmtTest.java
index 840c84394a3c2cd5d43a20f78360fae45fb1387d..850fb919d337fe707052170192bbac576d95396d 100644 (file)
@@ -89,7 +89,7 @@ public class IdentityStmtTest {
         SchemaContext result = reactor.buildEffective();
         assertNotNull(result);
 
-        Module testModule = result.findModuleByName("legal-chained-identity-test", null);
+        Module testModule = result.findModules("legal-chained-identity-test").iterator().next();
         assertNotNull(testModule);
 
         Set<IdentitySchemaNode> identities = testModule.getIdentities();
@@ -121,7 +121,7 @@ public class IdentityStmtTest {
         SchemaContext result = reactor.buildEffective();
         assertNotNull(result);
 
-        Module testModule = result.findModuleByName("duplicate-identity-test", null);
+        Module testModule = result.findModules("duplicate-identity-test").iterator().next();
         Set<IdentitySchemaNode> identities = testModule.getIdentities();
         assertEquals(1, identities.size());
     }