Split out yang-model-ri
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / UsesAugmentTest.java
index a0a9c59068c21172755fcf423c95fa605048f9e4..7e09d8a6e25c130074a0d4185847b0b021228b9b 100644 (file)
@@ -11,19 +11,19 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
+import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.assertPathEquals;
 
 import java.io.IOException;
-import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayDeque;
 import java.util.Collection;
 import java.util.Deque;
-import java.util.Set;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.common.Revision;
+import org.opendaylight.yangtools.yang.common.XMLNamespace;
 import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
@@ -37,15 +37,15 @@ import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 import org.opendaylight.yangtools.yang.model.api.type.Uint8TypeDefinition;
 import org.opendaylight.yangtools.yang.model.api.type.UnionTypeDefinition;
 import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException;
-import org.opendaylight.yangtools.yang.model.util.type.BaseTypes;
+import org.opendaylight.yangtools.yang.model.ri.type.BaseTypes;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 
 public class UsesAugmentTest {
 
     private static final QNameModule UG = QNameModule.create(
-        URI.create("urn:opendaylight:params:xml:ns:yang:uses-grouping"), Revision.of("2013-07-30"));
+        XMLNamespace.of("urn:opendaylight:params:xml:ns:yang:uses-grouping"), Revision.of("2013-07-30"));
     private static final QNameModule GD = QNameModule.create(
-        URI.create("urn:opendaylight:params:xml:ns:yang:grouping-definitions"), Revision.of("2013-09-04"));
+        XMLNamespace.of("urn:opendaylight:params:xml:ns:yang:grouping-definitions"), Revision.of("2013-09-04"));
 
     private SchemaContext context;
 
@@ -117,15 +117,15 @@ public class UsesAugmentTest {
         final Deque<QName> path = new ArrayDeque<>();
 
         // * notification pcreq
-        final Set<NotificationDefinition> notifications = testModule.getNotifications();
+        final Collection<? extends NotificationDefinition> notifications = testModule.getNotifications();
         assertEquals(1, notifications.size());
         final NotificationDefinition pcreq = notifications.iterator().next();
         assertNotNull(pcreq);
         QName expectedQName = QName.create(UG, "pcreq");
         path.offer(expectedQName);
         SchemaPath expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, pcreq.getPath());
-        Collection<DataSchemaNode> childNodes = pcreq.getChildNodes();
+        assertPathEquals(expectedPath, pcreq);
+        Collection<? extends DataSchemaNode> childNodes = pcreq.getChildNodes();
         assertEquals(4, childNodes.size());
         // * |-- leaf version
         LeafSchemaNode version = (LeafSchemaNode) pcreq.getDataChildByName(QName.create(testModule.getQNameModule(),
@@ -134,11 +134,10 @@ public class UsesAugmentTest {
         expectedQName = QName.create(UG, "version");
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, version.getPath());
+        assertPathEquals(expectedPath, version);
         expectedQName = QName.create(UG, "version");
         path.offer(expectedQName);
-        expectedPath = SchemaPath.create(true, pcreq.getQName(), expectedQName);
-        assertEquals(expectedPath, version.getType().getPath());
+        assertEquals(expectedQName, version.getType().getQName());
         assertEquals(BaseTypes.uint8Type(), version.getType().getBaseType().getBaseType());
         assertTrue(version.isAddedByUses());
         // * |-- leaf type
@@ -151,13 +150,12 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, type.getPath());
+        assertPathEquals(expectedPath, type);
         expectedQName = QName.create(GD, "int-ext");
         path.offer(expectedQName);
-        expectedPath = SchemaPath.create(true, expectedQName);
-        assertEquals(expectedPath, type.getType().getPath());
+        assertEquals(expectedQName, type.getType().getQName());
         final UnionTypeDefinition union = (UnionTypeDefinition) type.getType().getBaseType();
-        assertEquals(SchemaPath.create(true, expectedQName, QName.create(expectedQName, "union")), union.getPath());
+        assertEquals(QName.create(expectedQName, "union"), union.getQName());
         assertEquals(2, union.getTypes().size());
         // * |-- list requests
         final ListSchemaNode requests = (ListSchemaNode) pcreq.getDataChildByName(QName.create(
@@ -169,7 +167,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, requests.getPath());
+        assertPathEquals(expectedPath, requests);
         assertFalse(requests.isAddedByUses());
         childNodes = requests.getChildNodes();
         assertEquals(3, childNodes.size());
@@ -180,7 +178,7 @@ public class UsesAugmentTest {
         expectedQName = QName.create(UG, "rp");
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, rp.getPath());
+        assertPathEquals(expectedPath, rp);
         assertFalse(rp.isAddedByUses());
         childNodes = rp.getChildNodes();
         assertEquals(4, childNodes.size());
@@ -192,7 +190,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, processingRule.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, processingRule.getPath());
+        assertPathEquals(expectedPath, processingRule);
         assertEquals(BaseTypes.booleanType(), processingRule.getType());
         assertTrue(processingRule.isAddedByUses());
         // * |-- |-- |-- leaf ignore
@@ -204,7 +202,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, ignore.getPath());
+        assertPathEquals(expectedPath, ignore);
         assertEquals(BaseTypes.booleanType(), ignore.getType());
         assertTrue(ignore.isAddedByUses());
         // * |-- |-- |-- leaf priority
@@ -216,7 +214,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, priority.getPath());
+        assertPathEquals(expectedPath, priority);
         expectedQName = QName.create(UG, "uint8");
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
@@ -234,7 +232,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, box.getPath());
+        assertPathEquals(expectedPath, box);
         assertTrue(box.isAddedByUses());
         // * |-- |-- |-- |-- container order
         final ContainerSchemaNode order = (ContainerSchemaNode) box.getDataChildByName(QName.create(
@@ -244,7 +242,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, order.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, order.getPath());
+        assertPathEquals(expectedPath, order);
         assertTrue(order.isAddedByUses());
         assertTrue(order.isAugmenting());
         assertEquals(2, order.getChildNodes().size());
@@ -256,7 +254,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, delete.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, delete.getPath());
+        assertPathEquals(expectedPath, delete);
         assertEquals(BaseTypes.uint32Type(), delete.getType());
         assertTrue(delete.isAddedByUses());
         // * |-- |-- |-- |-- |-- leaf setup
@@ -268,7 +266,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, setup.getPath());
+        assertPathEquals(expectedPath, setup);
         assertEquals(BaseTypes.uint32Type(), setup.getType());
         assertTrue(setup.isAddedByUses());
         // * |-- |-- path-key-expansion
@@ -283,7 +281,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, pke.getPath());
+        assertPathEquals(expectedPath, pke);
         assertFalse(pke.isAddedByUses());
         // * |-- |-- |-- path-key
         final ContainerSchemaNode pathKey = (ContainerSchemaNode) pke.getDataChildByName(QName.create(
@@ -293,7 +291,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, pathKey.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, pathKey.getPath());
+        assertPathEquals(expectedPath, pathKey);
         assertFalse(pathKey.isAddedByUses());
         assertEquals(3, pathKey.getChildNodes().size());
         // * |-- |-- |-- |-- leaf processing-rule
@@ -304,7 +302,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, processingRule.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, processingRule.getPath());
+        assertPathEquals(expectedPath, processingRule);
         assertEquals(BaseTypes.booleanType(), processingRule.getType());
         assertTrue(processingRule.isAddedByUses());
         // * |-- |-- |-- |-- leaf ignore
@@ -315,7 +313,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, ignore.getPath());
+        assertPathEquals(expectedPath, ignore);
         assertEquals(BaseTypes.booleanType(), ignore.getType());
         assertTrue(ignore.isAddedByUses());
         // * |-- |-- |-- |-- list path-keys
@@ -327,7 +325,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, pathKeys.getPath());
+        assertPathEquals(expectedPath, pathKeys);
         assertTrue(pathKeys.isAddedByUses());
         childNodes = pathKeys.getChildNodes();
         assertEquals(2, childNodes.size());
@@ -338,7 +336,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, version.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, version.getPath());
+        assertPathEquals(expectedPath, version);
         assertTrue(version.getType() instanceof Uint8TypeDefinition);
         assertEquals(BaseTypes.uint8Type(), version.getType().getBaseType().getBaseType());
         assertTrue(version.isAddedByUses());
@@ -351,7 +349,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, type.getPath());
+        assertPathEquals(expectedPath, type);
         assertTrue(type.getType() instanceof UnionTypeDefinition);
         assertTrue(type.isAddedByUses());
         assertTrue(type.isAugmenting());
@@ -367,7 +365,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, sc.getPath());
+        assertPathEquals(expectedPath, sc);
         assertFalse(sc.isAddedByUses());
         // * |-- |-- |-- container p2p
         final ContainerSchemaNode p2p = (ContainerSchemaNode) sc.getDataChildByName(QName.create(
@@ -377,7 +375,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, p2p.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, p2p.getPath());
+        assertPathEquals(expectedPath, p2p);
         assertFalse(p2p.isAddedByUses());
         // * |-- |-- |-- |-- container endpoints
         final ContainerSchemaNode endpoints = (ContainerSchemaNode) p2p.getDataChildByName(QName.create(
@@ -387,7 +385,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, endpoints.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, endpoints.getPath());
+        assertPathEquals(expectedPath, endpoints);
         assertFalse(endpoints.isAddedByUses());
         // * |-- |-- |-- |-- |-- leaf processing-rule
         processingRule = (LeafSchemaNode) endpoints.getDataChildByName(QName.create(testModule.getQNameModule(),
@@ -397,7 +395,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, processingRule.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, processingRule.getPath());
+        assertPathEquals(expectedPath, processingRule);
         assertEquals(BaseTypes.booleanType(), processingRule.getType());
         assertTrue(processingRule.isAddedByUses());
         // * |-- |-- |-- |-- |-- leaf ignore
@@ -408,7 +406,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, ignore.getPath());
+        assertPathEquals(expectedPath, ignore);
         assertEquals(BaseTypes.booleanType(), ignore.getType());
         assertTrue(ignore.isAddedByUses());
         // * |-- |-- |-- |-- |-- container box
@@ -419,7 +417,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, box.getPath());
+        assertPathEquals(expectedPath, box);
         assertTrue(box.isAddedByUses());
         // * |-- |-- |-- |-- |-- choice address-family
         final ChoiceSchemaNode af = (ChoiceSchemaNode) endpoints.getDataChildByName(QName.create(
@@ -430,7 +428,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, af.getPath());
+        assertPathEquals(expectedPath, af);
         assertTrue(af.isAddedByUses());
         // * |-- |-- |-- |-- container reported-route
         final ContainerSchemaNode reportedRoute = (ContainerSchemaNode) p2p.getDataChildByName(QName.create(
@@ -442,7 +440,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, reportedRoute.getPath());
+        assertPathEquals(expectedPath, reportedRoute);
         assertFalse(reportedRoute.isAddedByUses());
         // * |-- |-- |-- |-- |-- leaf processing-rule
         processingRule = (LeafSchemaNode) reportedRoute.getDataChildByName(QName.create(testModule.getQNameModule(),
@@ -452,7 +450,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, processingRule.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, processingRule.getPath());
+        assertPathEquals(expectedPath, processingRule);
         assertEquals(BaseTypes.booleanType(), processingRule.getType());
         assertTrue(processingRule.isAddedByUses());
         // * |-- |-- |-- |-- |-- leaf ignore
@@ -463,7 +461,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, ignore.getPath());
+        assertPathEquals(expectedPath, ignore);
         assertEquals(BaseTypes.booleanType(), ignore.getType());
         assertTrue(ignore.isAddedByUses());
         // * |-- |-- |-- |-- |-- list subobjects
@@ -475,7 +473,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, subobjects.getPath());
+        assertPathEquals(expectedPath, subobjects);
         assertTrue(subobjects.isAddedByUses());
         // * |-- |-- |-- |-- |-- container bandwidth
         ContainerSchemaNode bandwidth = (ContainerSchemaNode) reportedRoute.getDataChildByName(QName.create(
@@ -486,7 +484,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, bandwidth.getPath());
+        assertPathEquals(expectedPath, bandwidth);
         assertFalse(bandwidth.isAddedByUses());
         // * |-- |-- |-- |-- container bandwidth
         bandwidth = (ContainerSchemaNode) p2p
@@ -498,7 +496,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, bandwidth.getPath());
+        assertPathEquals(expectedPath, bandwidth);
         assertTrue(bandwidth.isAddedByUses());
         // * |-- |-- |-- |-- |-- leaf processing-rule
         processingRule = (LeafSchemaNode) bandwidth.getDataChildByName(QName.create(testModule.getQNameModule(),
@@ -508,7 +506,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, processingRule.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, processingRule.getPath());
+        assertPathEquals(expectedPath, processingRule);
         assertEquals(BaseTypes.booleanType(), processingRule.getType());
         assertTrue(processingRule.isAddedByUses());
         // * |-- |-- |-- |-- |-- leaf ignore
@@ -519,7 +517,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, ignore.getPath());
+        assertPathEquals(expectedPath, ignore);
         assertEquals(BaseTypes.booleanType(), ignore.getType());
         assertTrue(ignore.isAddedByUses());
         // * |-- |-- |-- |-- |-- container bandwidth
@@ -531,7 +529,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, bandwidthInner.getPath());
+        assertPathEquals(expectedPath, bandwidthInner);
         assertTrue(bandwidthInner.isAddedByUses());
         // * |-- list svec
         final ListSchemaNode svec = (ListSchemaNode) pcreq.getDataChildByName(QName.create(testModule.getQNameModule(),
@@ -546,7 +544,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, svec.getPath());
+        assertPathEquals(expectedPath, svec);
         assertFalse(svec.isAddedByUses());
         // * |-- |-- leaf link-diverse
         final LeafSchemaNode linkDiverse = (LeafSchemaNode) svec.getDataChildByName(QName.create(
@@ -556,7 +554,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, linkDiverse.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, linkDiverse.getPath());
+        assertPathEquals(expectedPath, linkDiverse);
         assertEquals(BaseTypes.booleanType(), linkDiverse.getType().getBaseType());
         assertTrue(linkDiverse.isAddedByUses());
         // * |-- |-- leaf processing-rule
@@ -568,7 +566,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, processingRule.getPath());
+        assertPathEquals(expectedPath, processingRule);
         assertEquals(BaseTypes.booleanType(), processingRule.getType());
         assertTrue(processingRule.isAddedByUses());
         // * |-- |-- leaf ignore
@@ -579,7 +577,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, ignore.getPath());
+        assertPathEquals(expectedPath, ignore);
         assertEquals(BaseTypes.booleanType(), ignore.getType());
         assertTrue(ignore.isAddedByUses());
         // * |-- |-- list metric
@@ -591,7 +589,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, metric.getPath());
+        assertPathEquals(expectedPath, metric);
         assertFalse(metric.isAddedByUses());
         // * |-- |-- |-- leaf metric-type
         final LeafSchemaNode metricType = (LeafSchemaNode) metric.getDataChildByName(QName.create(
@@ -601,7 +599,7 @@ public class UsesAugmentTest {
         assertEquals(expectedQName, metricType.getQName());
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, metricType.getPath());
+        assertPathEquals(expectedPath, metricType);
         assertEquals(BaseTypes.uint8Type(), metricType.getType());
         assertTrue(metricType.isAddedByUses());
         // * |-- |-- |-- box
@@ -612,7 +610,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, box.getPath());
+        assertPathEquals(expectedPath, box);
         assertTrue(box.isAddedByUses());
         // * |-- |-- |-- leaf processing-rule
         processingRule = (LeafSchemaNode) metric.getDataChildByName(QName.create(testModule.getQNameModule(),
@@ -623,7 +621,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, processingRule.getPath());
+        assertPathEquals(expectedPath, processingRule);
         assertEquals(BaseTypes.booleanType(), processingRule.getType());
         assertTrue(processingRule.isAddedByUses());
         // * |-- |-- |-- leaf ignore
@@ -634,7 +632,7 @@ public class UsesAugmentTest {
         path.pollLast();
         path.offer(expectedQName);
         expectedPath = SchemaPath.create(path, true);
-        assertEquals(expectedPath, ignore.getPath());
+        assertPathEquals(expectedPath, ignore);
         assertEquals(BaseTypes.booleanType(), ignore.getType());
         assertTrue(ignore.isAddedByUses());
     }
@@ -642,7 +640,7 @@ public class UsesAugmentTest {
     @Test
     public void testTypedefs() throws Exception {
         final Module testModule = TestUtils.findModule(context, "grouping-definitions").get();
-        final Set<TypeDefinition<?>> types = testModule.getTypeDefinitions();
+        final Collection<? extends TypeDefinition<?>> types = testModule.getTypeDefinitions();
 
         TypeDefinition<?> intExt = null;
         for (final TypeDefinition<?> td : types) {
@@ -652,8 +650,7 @@ public class UsesAugmentTest {
         }
         assertNotNull(intExt);
 
-        SchemaPath expectedPath = SchemaPath.create(true, QName.create(GD, "int-ext"));
-        assertEquals(expectedPath, intExt.getPath());
+        assertEquals(QName.create(GD, "int-ext"), intExt.getQName());
 
         final UnionTypeDefinition union = (UnionTypeDefinition) intExt.getBaseType();
 
@@ -668,9 +665,7 @@ public class UsesAugmentTest {
         }
         assertNotNull(uint8);
         assertNotNull(pv);
-
-        expectedPath = SchemaPath.create(true, QName.create(GD, "int-ext"), QName.create(GD, "union"));
-        assertEquals(expectedPath, union.getPath());
+        assertEquals(QName.create(GD, "union"), union.getQName());
     }
 
 }