X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fimpl%2FUsesAugmentTest.java;h=48ce134171e557d0571b6e689460b1de731dba07;hb=63391074baa84256f2e66fcef0ce02a686a960ea;hp=79136aa5fc49dc48a51f88a751ed507729257aed;hpb=48212b7efa5c09e1d6a950eb7b0705767d9c8512;p=yangtools.git diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/impl/UsesAugmentTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/impl/UsesAugmentTest.java index 79136aa5fc..48ce134171 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/impl/UsesAugmentTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/impl/UsesAugmentTest.java @@ -11,7 +11,6 @@ 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 com.google.common.collect.Lists; import java.io.FileNotFoundException; import java.io.IOException; @@ -20,6 +19,7 @@ import java.net.URISyntaxException; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.util.Collection; import java.util.Date; import java.util.LinkedList; import java.util.List; @@ -27,7 +27,7 @@ import java.util.Set; import org.junit.Before; import org.junit.Test; import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.model.api.ChoiceNode; +import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode; import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode; import org.opendaylight.yangtools.yang.model.api.DataSchemaNode; import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode; @@ -48,8 +48,6 @@ public class UsesAugmentTest { private static final URI GD_NS = URI.create("urn:opendaylight:params:xml:ns:yang:grouping-definitions"); private Date UG_REV; private Date GD_REV; - private static final String UG_PREF = "ug"; - private static final String GD_PREF = "gd"; private Set modules; @@ -113,6 +111,8 @@ public class UsesAugmentTest { * |-- |-- leaf ignore (U) * * U = added by uses A = added by augment + * + * @throws Exception if exception occurs */ @Test public void testAugmentInUses() throws Exception { @@ -126,20 +126,20 @@ public class UsesAugmentTest { assertEquals(1, notifications.size()); NotificationDefinition pcreq = notifications.iterator().next(); assertNotNull(pcreq); - QName expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "pcreq"); + QName expectedQName = QName.create(UG_NS, UG_REV, "pcreq"); path.offer(expectedQName); SchemaPath expectedPath = SchemaPath.create(path, true); assertEquals(expectedPath, pcreq.getPath()); - Set childNodes = pcreq.getChildNodes(); + Collection childNodes = pcreq.getChildNodes(); assertEquals(4, childNodes.size()); // * |-- leaf version LeafSchemaNode version = (LeafSchemaNode) pcreq.getDataChildByName("version"); assertNotNull(version); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "version"); + expectedQName = QName.create(UG_NS, UG_REV, "version"); path.offer(expectedQName); expectedPath = SchemaPath.create(path, true); assertEquals(expectedPath, version.getPath()); - expectedQName = new QName(GD_NS, GD_REV, GD_PREF, "protocol-version"); + expectedQName = QName.create(GD_NS, GD_REV, "protocol-version"); path.offer(expectedQName); expectedPath = SchemaPath.create(Lists.newArrayList(expectedQName), true); assertEquals(expectedPath, version.getType().getPath()); @@ -148,14 +148,14 @@ public class UsesAugmentTest { // * |-- leaf type LeafSchemaNode type = (LeafSchemaNode) pcreq.getDataChildByName("type"); assertNotNull(type); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "type"); + expectedQName = QName.create(UG_NS, UG_REV, "type"); assertTrue(type.isAddedByUses()); path.pollLast(); path.pollLast(); path.offer(expectedQName); expectedPath = SchemaPath.create(path, true); assertEquals(expectedPath, type.getPath()); - expectedQName = new QName(GD_NS, GD_REV, GD_PREF, "int-ext"); + expectedQName = QName.create(GD_NS, GD_REV, "int-ext"); path.offer(expectedQName); expectedPath = SchemaPath.create(Lists.newArrayList(expectedQName), true); assertEquals(expectedPath, type.getType().getPath()); @@ -165,7 +165,7 @@ public class UsesAugmentTest { // * |-- list requests ListSchemaNode requests = (ListSchemaNode) pcreq.getDataChildByName("requests"); assertNotNull(requests); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "requests"); + expectedQName = QName.create(UG_NS, UG_REV, "requests"); assertEquals(expectedQName, requests.getQName()); path.pollLast(); path.pollLast(); @@ -178,7 +178,7 @@ public class UsesAugmentTest { // * |-- |-- container rp ContainerSchemaNode rp = (ContainerSchemaNode) requests.getDataChildByName("rp"); assertNotNull(rp); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "rp"); + expectedQName = QName.create(UG_NS, UG_REV, "rp"); path.offer(expectedQName); expectedPath = SchemaPath.create(path, true); assertEquals(expectedPath, rp.getPath()); @@ -188,7 +188,7 @@ public class UsesAugmentTest { // * |-- |-- |-- leaf processing-rule LeafSchemaNode processingRule = (LeafSchemaNode) rp.getDataChildByName("processing-rule"); assertNotNull(processingRule); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "processing-rule"); + expectedQName = QName.create(UG_NS, UG_REV, "processing-rule"); assertEquals(expectedQName, processingRule.getQName()); path.offer(expectedQName); expectedPath = SchemaPath.create(path, true); @@ -198,7 +198,7 @@ public class UsesAugmentTest { // * |-- |-- |-- leaf ignore LeafSchemaNode ignore = (LeafSchemaNode) rp.getDataChildByName("ignore"); assertNotNull(ignore); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "ignore"); + expectedQName = QName.create(UG_NS, UG_REV, "ignore"); assertEquals(expectedQName, ignore.getQName()); path.pollLast(); path.offer(expectedQName); @@ -209,13 +209,13 @@ public class UsesAugmentTest { // * |-- |-- |-- leaf priority LeafSchemaNode priority = (LeafSchemaNode) rp.getDataChildByName("priority"); assertNotNull(priority); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "priority"); + expectedQName = QName.create(UG_NS, UG_REV, "priority"); assertEquals(expectedQName, priority.getQName()); path.pollLast(); path.offer(expectedQName); expectedPath = SchemaPath.create(path, true); assertEquals(expectedPath, priority.getPath()); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "uint8"); + expectedQName = QName.create(UG_NS, UG_REV, "uint8"); path.offer(expectedQName); expectedPath = SchemaPath.create(path, true); // TODO @@ -225,7 +225,7 @@ public class UsesAugmentTest { // * |-- |-- |-- container box ContainerSchemaNode box = (ContainerSchemaNode) rp.getDataChildByName("box"); assertNotNull(box); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "box"); + expectedQName = QName.create(UG_NS, UG_REV, "box"); assertEquals(expectedQName, box.getQName()); path.pollLast(); path.pollLast(); @@ -236,7 +236,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- container order ContainerSchemaNode order = (ContainerSchemaNode) box.getDataChildByName("order"); assertNotNull(order); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "order"); + expectedQName = QName.create(UG_NS, UG_REV, "order"); assertEquals(expectedQName, order.getQName()); path.offer(expectedQName); expectedPath = SchemaPath.create(path, true); @@ -247,7 +247,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf delete LeafSchemaNode delete = (LeafSchemaNode) order.getDataChildByName("delete"); assertNotNull(delete); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "delete"); + expectedQName = QName.create(UG_NS, UG_REV, "delete"); assertEquals(expectedQName, delete.getQName()); path.offer(expectedQName); expectedPath = SchemaPath.create(path, true); @@ -257,7 +257,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf setup LeafSchemaNode setup = (LeafSchemaNode) order.getDataChildByName("setup"); assertNotNull(setup); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "setup"); + expectedQName = QName.create(UG_NS, UG_REV, "setup"); assertEquals(expectedQName, setup.getQName()); path.pollLast(); path.offer(expectedQName); @@ -268,7 +268,7 @@ public class UsesAugmentTest { // * |-- |-- path-key-expansion ContainerSchemaNode pke = (ContainerSchemaNode) requests.getDataChildByName("path-key-expansion"); assertNotNull(pke); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "path-key-expansion"); + expectedQName = QName.create(UG_NS, UG_REV, "path-key-expansion"); assertEquals(expectedQName, pke.getQName()); path.pollLast(); path.pollLast(); @@ -281,7 +281,7 @@ public class UsesAugmentTest { // * |-- |-- |-- path-key ContainerSchemaNode pathKey = (ContainerSchemaNode) pke.getDataChildByName("path-key"); assertNotNull(pathKey); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "path-key"); + expectedQName = QName.create(UG_NS, UG_REV, "path-key"); assertEquals(expectedQName, pathKey.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -291,7 +291,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- leaf processing-rule processingRule = (LeafSchemaNode) pathKey.getDataChildByName("processing-rule"); assertNotNull(processingRule); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "processing-rule"); + expectedQName = QName.create(UG_NS, UG_REV, "processing-rule"); assertEquals(expectedQName, processingRule.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -301,7 +301,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- leaf ignore ignore = (LeafSchemaNode) pathKey.getDataChildByName("ignore"); assertNotNull(ignore); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "ignore"); + expectedQName = QName.create(UG_NS, UG_REV, "ignore"); assertEquals(expectedQName, ignore.getQName()); path.pollLast(); path.offer(expectedQName); @@ -312,7 +312,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- list path-keys ListSchemaNode pathKeys = (ListSchemaNode) pathKey.getDataChildByName("path-keys"); assertNotNull(pathKeys); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "path-keys"); + expectedQName = QName.create(UG_NS, UG_REV, "path-keys"); assertEquals(expectedQName, pathKeys.getQName()); path.pollLast(); path.offer(expectedQName); @@ -324,7 +324,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf version version = (LeafSchemaNode) pathKeys.getDataChildByName("version"); assertNotNull(version); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "version"); + expectedQName = QName.create(UG_NS, UG_REV, "version"); assertEquals(expectedQName, version.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -336,7 +336,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf type type = (LeafSchemaNode) pathKeys.getDataChildByName("type"); assertNotNull(type); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "type"); + expectedQName = QName.create(UG_NS, UG_REV, "type"); assertEquals(expectedQName, type.getQName()); path.pollLast(); path.offer(expectedQName); @@ -348,7 +348,7 @@ public class UsesAugmentTest { // * |-- |-- container segment-computation ContainerSchemaNode sc = (ContainerSchemaNode) requests.getDataChildByName("segment-computation"); assertNotNull(sc); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "segment-computation"); + expectedQName = QName.create(UG_NS, UG_REV, "segment-computation"); assertEquals(expectedQName, sc.getQName()); path.pollLast(); path.pollLast(); @@ -361,7 +361,7 @@ public class UsesAugmentTest { // * |-- |-- |-- container p2p ContainerSchemaNode p2p = (ContainerSchemaNode) sc.getDataChildByName("p2p"); assertNotNull(p2p); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "p2p"); + expectedQName = QName.create(UG_NS, UG_REV, "p2p"); assertEquals(expectedQName, p2p.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -370,7 +370,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- container endpoints ContainerSchemaNode endpoints = (ContainerSchemaNode) p2p.getDataChildByName("endpoints"); assertNotNull(endpoints); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "endpoints"); + expectedQName = QName.create(UG_NS, UG_REV, "endpoints"); assertEquals(expectedQName, endpoints.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -379,7 +379,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf processing-rule processingRule = (LeafSchemaNode) endpoints.getDataChildByName("processing-rule"); assertNotNull(processingRule); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "processing-rule"); + expectedQName = QName.create(UG_NS, UG_REV, "processing-rule"); assertEquals(expectedQName, processingRule.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -389,7 +389,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf ignore ignore = (LeafSchemaNode) endpoints.getDataChildByName("ignore"); assertNotNull(ignore); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "ignore"); + expectedQName = QName.create(UG_NS, UG_REV, "ignore"); assertEquals(expectedQName, ignore.getQName()); path.pollLast(); path.offer(expectedQName); @@ -400,7 +400,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- container box box = (ContainerSchemaNode) endpoints.getDataChildByName("box"); assertNotNull(box); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "box"); + expectedQName = QName.create(UG_NS, UG_REV, "box"); assertEquals(expectedQName, box.getQName()); path.pollLast(); path.offer(expectedQName); @@ -408,9 +408,9 @@ public class UsesAugmentTest { assertEquals(expectedPath, box.getPath()); assertTrue(box.isAddedByUses()); // * |-- |-- |-- |-- |-- choice address-family - ChoiceNode af = (ChoiceNode) endpoints.getDataChildByName("address-family"); + ChoiceSchemaNode af = (ChoiceSchemaNode) endpoints.getDataChildByName("address-family"); assertNotNull(af); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "address-family"); + expectedQName = QName.create(UG_NS, UG_REV, "address-family"); assertEquals(expectedQName, af.getQName()); path.pollLast(); path.offer(expectedQName); @@ -420,7 +420,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- container reported-route ContainerSchemaNode reportedRoute = (ContainerSchemaNode) p2p.getDataChildByName("reported-route"); assertNotNull(reportedRoute); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "reported-route"); + expectedQName = QName.create(UG_NS, UG_REV, "reported-route"); assertEquals(expectedQName, reportedRoute.getQName()); path.pollLast(); path.pollLast(); @@ -431,7 +431,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf processing-rule processingRule = (LeafSchemaNode) reportedRoute.getDataChildByName("processing-rule"); assertNotNull(processingRule); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "processing-rule"); + expectedQName = QName.create(UG_NS, UG_REV, "processing-rule"); assertEquals(expectedQName, processingRule.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -441,7 +441,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf ignore ignore = (LeafSchemaNode) reportedRoute.getDataChildByName("ignore"); assertNotNull(ignore); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "ignore"); + expectedQName = QName.create(UG_NS, UG_REV, "ignore"); assertEquals(expectedQName, ignore.getQName()); path.pollLast(); path.offer(expectedQName); @@ -452,7 +452,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- list subobjects ListSchemaNode subobjects = (ListSchemaNode) reportedRoute.getDataChildByName("subobjects"); assertNotNull(subobjects); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "subobjects"); + expectedQName = QName.create(UG_NS, UG_REV, "subobjects"); assertEquals(expectedQName, subobjects.getQName()); path.pollLast(); path.offer(expectedQName); @@ -462,7 +462,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- container bandwidth ContainerSchemaNode bandwidth = (ContainerSchemaNode) reportedRoute.getDataChildByName("bandwidth"); assertNotNull(bandwidth); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "bandwidth"); + expectedQName = QName.create(UG_NS, UG_REV, "bandwidth"); assertEquals(expectedQName, bandwidth.getQName()); path.pollLast(); path.offer(expectedQName); @@ -472,7 +472,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- container bandwidth bandwidth = (ContainerSchemaNode) p2p.getDataChildByName("bandwidth"); assertNotNull(bandwidth); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "bandwidth"); + expectedQName = QName.create(UG_NS, UG_REV, "bandwidth"); assertEquals(expectedQName, bandwidth.getQName()); path.pollLast(); path.pollLast(); @@ -483,7 +483,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf processing-rule processingRule = (LeafSchemaNode) bandwidth.getDataChildByName("processing-rule"); assertNotNull(processingRule); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "processing-rule"); + expectedQName = QName.create(UG_NS, UG_REV, "processing-rule"); assertEquals(expectedQName, processingRule.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -493,7 +493,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- leaf ignore ignore = (LeafSchemaNode) bandwidth.getDataChildByName("ignore"); assertNotNull(ignore); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "ignore"); + expectedQName = QName.create(UG_NS, UG_REV, "ignore"); assertEquals(expectedQName, ignore.getQName()); path.pollLast(); path.offer(expectedQName); @@ -504,7 +504,7 @@ public class UsesAugmentTest { // * |-- |-- |-- |-- |-- container bandwidth ContainerSchemaNode bandwidthInner = (ContainerSchemaNode) bandwidth.getDataChildByName("bandwidth"); assertNotNull(bandwidthInner); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "bandwidth"); + expectedQName = QName.create(UG_NS, UG_REV, "bandwidth"); assertEquals(expectedQName, bandwidth.getQName()); path.pollLast(); path.offer(expectedQName); @@ -514,7 +514,7 @@ public class UsesAugmentTest { // * |-- list svec ListSchemaNode svec = (ListSchemaNode) pcreq.getDataChildByName("svec"); assertNotNull(svec); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "svec"); + expectedQName = QName.create(UG_NS, UG_REV, "svec"); assertEquals(expectedQName, svec.getQName()); path.pollLast(); path.pollLast(); @@ -528,7 +528,7 @@ public class UsesAugmentTest { // * |-- |-- leaf link-diverse LeafSchemaNode linkDiverse = (LeafSchemaNode) svec.getDataChildByName("link-diverse"); assertNotNull(linkDiverse); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "link-diverse"); + expectedQName = QName.create(UG_NS, UG_REV, "link-diverse"); assertEquals(expectedQName, linkDiverse.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -538,7 +538,7 @@ public class UsesAugmentTest { // * |-- |-- leaf processing-rule processingRule = (LeafSchemaNode) svec.getDataChildByName("processing-rule"); assertNotNull(processingRule); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "processing-rule"); + expectedQName = QName.create(UG_NS, UG_REV, "processing-rule"); assertEquals(expectedQName, processingRule.getQName()); path.pollLast(); path.offer(expectedQName); @@ -549,7 +549,7 @@ public class UsesAugmentTest { // * |-- |-- leaf ignore ignore = (LeafSchemaNode) svec.getDataChildByName("ignore"); assertNotNull(ignore); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "ignore"); + expectedQName = QName.create(UG_NS, UG_REV, "ignore"); assertEquals(expectedQName, ignore.getQName()); path.pollLast(); path.offer(expectedQName); @@ -560,7 +560,7 @@ public class UsesAugmentTest { // * |-- |-- list metric ListSchemaNode metric = (ListSchemaNode) svec.getDataChildByName("metric"); assertNotNull(metric); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "metric"); + expectedQName = QName.create(UG_NS, UG_REV, "metric"); assertEquals(expectedQName, metric.getQName()); path.pollLast(); path.offer(expectedQName); @@ -570,7 +570,7 @@ public class UsesAugmentTest { // * |-- |-- |-- leaf metric-type LeafSchemaNode metricType = (LeafSchemaNode) metric.getDataChildByName("metric-type"); assertNotNull(metricType); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "metric-type"); + expectedQName = QName.create(UG_NS, UG_REV, "metric-type"); assertEquals(expectedQName, metricType.getQName()); path.offer(expectedQName); expectedPath= SchemaPath.create(path, true); @@ -580,7 +580,7 @@ public class UsesAugmentTest { // * |-- |-- |-- box box = (ContainerSchemaNode) metric.getDataChildByName("box"); assertNotNull(box); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "box"); + expectedQName = QName.create(UG_NS, UG_REV, "box"); assertEquals(expectedQName, box.getQName()); path.pollLast(); path.offer(expectedQName); @@ -590,7 +590,7 @@ public class UsesAugmentTest { // * |-- |-- |-- leaf processing-rule processingRule = (LeafSchemaNode) metric.getDataChildByName("processing-rule"); assertNotNull(processingRule); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "processing-rule"); + expectedQName = QName.create(UG_NS, UG_REV, "processing-rule"); assertEquals(expectedQName, processingRule.getQName()); path.pollLast(); path.offer(expectedQName); @@ -601,7 +601,7 @@ public class UsesAugmentTest { // * |-- |-- |-- leaf ignore ignore = (LeafSchemaNode) metric.getDataChildByName("ignore"); assertNotNull(ignore); - expectedQName = new QName(UG_NS, UG_REV, UG_PREF, "ignore"); + expectedQName = QName.create(UG_NS, UG_REV, "ignore"); assertEquals(expectedQName, ignore.getQName()); path.pollLast(); path.offer(expectedQName); @@ -625,7 +625,7 @@ public class UsesAugmentTest { } assertNotNull(intExt); - List path = Lists.newArrayList(new QName(GD_NS, GD_REV, GD_PREF, "int-ext")); + List path = Lists.newArrayList(QName.create(GD_NS, GD_REV, "int-ext")); SchemaPath expectedPath = SchemaPath.create(path, true); assertEquals(expectedPath, intExt.getPath());