BUG-4688: Rework SchemaContext module lookups
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / Bug5884Test.java
index 66725085e07cf3dca9c3d4f643302b7c7b53a919..7e352554eb269eeac61e7dd392b1533185311c1d 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.stmt;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-import java.util.Date;
 import java.util.Iterator;
 import java.util.Set;
 import org.junit.Test;
@@ -35,8 +34,7 @@ public class Bug5884Test {
         final QName root = QName.create(NS, REV, "main-container");
         final QName choice = QName.create(NS, REV, "test-choice");
         final QName testContainerQname = QName.create(NS, REV, "test");
-        final Date date = QName.parseRevision("2016-01-01");
-        final Module foo = context.findModuleByName("foo", date);
+        final Module foo = context.findModule("foo", QName.parseRevision("2016-01-01")).get();
         final ContainerSchemaNode rootContainer = (ContainerSchemaNode) context.getDataChildByName(root);
         final ContainerSchemaNode testContainer = (ContainerSchemaNode) rootContainer.getDataChildByName(
             testContainerQname);