Add XMLNamespace
[yangtools.git] / yang / yang-data-impl / src / test / java / org / opendaylight / yangtools / yang / data / impl / leafref / Bug7844Test.java
index 9c8ca831f92e7e9a6c3b5be1c673bd828a16d1f9..def573928dfaef1650a95f57ebb5b3594a49a3c7 100644 (file)
@@ -13,11 +13,11 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import com.google.common.collect.ImmutableList;
-import java.net.URI;
 import java.util.Map;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
+import org.opendaylight.yangtools.yang.common.XMLNamespace;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 
@@ -37,7 +37,7 @@ public class Bug7844Test {
         final Map<QName, LeafRefContext> referencingChilds = leafRefContext.getReferencingChilds();
         assertEquals(7, referencingChilds.size());
 
-        final QNameModule bazQNameModule = QNameModule.create(URI.create(BAZ_NS));
+        final QNameModule bazQNameModule = QNameModule.create(XMLNamespace.of(BAZ_NS));
         final LeafRefPath expectedPathToBazTarget = LeafRefPath.create(true,
                 new QNameWithPredicateImpl(bazQNameModule, "root", ImmutableList.of()),
                 new QNameWithPredicateImpl(bazQNameModule, "target", ImmutableList.of()));
@@ -49,7 +49,7 @@ public class Bug7844Test {
         assertLeafRef(referencingChilds.get(bar("my-leafref-in-bar")), expectedPathToBazTarget);
         assertLeafRef(referencingChilds.get(bar("my-leafref-in-bar-2")), expectedPathToBazTarget);
 
-        final QNameModule barQNameModule = QNameModule.create(URI.create(BAR_NS));
+        final QNameModule barQNameModule = QNameModule.create(XMLNamespace.of(BAR_NS));
         final LeafRefPath expectedPathToBarTarget = LeafRefPath.create(true,
                 new QNameWithPredicateImpl(barQNameModule, "bar-target", ImmutableList.of()));
         assertLeafRef(referencingChilds.get(foo("direct-leafref")), expectedPathToBarTarget);