BUG-4688: Rework SchemaContext module lookups
[yangtools.git] / yang / yang-data-impl / src / test / java / org / opendaylight / yangtools / yang / data / impl / codecs / StringPatternCheckingCodecTest.java
index 573665c17f5608292f3feb6e19c3b742c26d71c8..244d56bc56a00d669ff76e68121b299955f34b53 100644 (file)
@@ -44,11 +44,9 @@ public class StringPatternCheckingCodecTest {
         assertNotNull(schemaContext);
 
         final QNameModule testModuleQName = QNameModule.create(new URI("string-pattern-checking-codec-test"),
-                SimpleDateFormatUtil.getRevisionFormat().parse("1970-01-01"));
-
-        final Module testModule = schemaContext.findModuleByName("string-pattern-checking-codec-test", null);
-        assertNotNull(testModule);
+                SimpleDateFormatUtil.DEFAULT_DATE_REV);
 
+        final Module testModule = schemaContext.findModules("string-pattern-checking-codec-test").iterator().next();
         final ContainerSchemaNode testContainer = (ContainerSchemaNode) testModule.getDataChildByName(
                 QName.create(testModuleQName, "test-container"));
         assertNotNull(testContainer);