Migrate getDataChildByName() users 22/94322/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 7 Dec 2020 09:24:48 +0000 (10:24 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 31 Dec 2020 13:22:45 +0000 (14:22 +0100)
These users are using getDataChildByName() in its nullable capacity,
migrate them to dataChildByName().

JIRA: YANGTOOLS-1183
Change-Id: Id2cdf95804b1faf6189863de9f96253ab459ed6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a25a8add2e3b3a38cf76ab963da9a89ff5326a55)

15 files changed:
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/codec/SchemaTracker.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/leafref/LeafRefUtils.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/ImmutableNodes.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaOrderedNormalizedNodeWriter.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaUtils.java
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/CompositeNodeDataWithSchema.java
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/DataSchemaContextNode.java
yang/yang-model-util-ut/src/test/java/org/opendaylight/yangtools/yang/model/util/ut/SchemaContextUtilTest.java
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java
yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtilTest.java
yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaRepositoryWithFeaturesTest.java
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/ControllerStmtParserTest.java
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/DeviationResolutionTest.java
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/EffectiveSchemaContextTest.java
yang/yang-parser-rfc7950/src/test/java/org/opendaylight/yangtools/yang/stmt/IfFeatureResolutionTest.java

index aec921d926382504084850531d694bd0a0b01519..c8d958449fa88026e6b2d46426395adbb5919f48 100644 (file)
@@ -136,7 +136,7 @@ public final class SchemaTracker {
         SchemaNode schema = null;
         final QName qname = name.getNodeType();
         if (parent instanceof DataNodeContainer) {
-            schema = ((DataNodeContainer)parent).getDataChildByName(qname);
+            schema = ((DataNodeContainer)parent).dataChildByName(qname);
             if (schema == null) {
                 if (parent instanceof GroupingDefinition) {
                     schema = (GroupingDefinition) parent;
index cd3d29643e5d8e31ecda96378373a29c84b9418e..f17f766ed72615f85814f5bd011af73f94c864ea 100644 (file)
@@ -63,7 +63,7 @@ public final class LeafRefUtils {
         DataNodeContainer currenDataNodeContainer = module;
         while (nodePathIterator.hasNext()) {
             final QName qname = nodePathIterator.next();
-            final DataSchemaNode child = currenDataNodeContainer.getDataChildByName(qname);
+            final DataSchemaNode child = currenDataNodeContainer.dataChildByName(qname);
 
             if (child instanceof DataNodeContainer) {
                 if (!(child instanceof CaseSchemaNode)) {
index c734ee84f041a5356cb1f709818505c8ff9d3e1d..5a96515d13da23583dae2dcaee0ee40d7f65f3d9 100644 (file)
@@ -239,7 +239,7 @@ public final class ImmutableNodes {
         final Iterator<PathArgument> it = id.getPathArguments().iterator();
         if (it.hasNext()) {
             topLevelElement = it.next();
-            final DataSchemaNode dataChildByName = ctx.getDataChildByName(topLevelElement.getNodeType());
+            final DataSchemaNode dataChildByName = ctx.dataChildByName(topLevelElement.getNodeType());
             checkNotNull(dataChildByName,
                 "Cannot find %s node in schema context. Instance identifier has to start from root", topLevelElement);
             instanceIdToNodes = InstanceIdToNodes.fromSchemaAndQNameChecked(ctx, topLevelElement.getNodeType());
index 4f2c4a524c8010619f2cfe0673047436b7a40c7f..6cb35a5dbb61e77094c9c3574ea9771e11ecd164 100644 (file)
@@ -67,7 +67,7 @@ public class SchemaOrderedNormalizedNodeWriter extends NormalizedNodeWriter {
     @Override
     public SchemaOrderedNormalizedNodeWriter write(final NormalizedNode<?, ?> node) throws IOException {
         if (Objects.equals(root, schemaContext)) {
-            currentSchemaNode = schemaContext.getDataChildByName(node.getNodeType());
+            currentSchemaNode = schemaContext.dataChildByName(node.getNodeType());
         } else {
             currentSchemaNode = root;
         }
index 63a98c54a88161491bc25d29bca2eaddb1a903ab..a93ff38ebdd7754b1b162aed00d6046112fb284f 100644 (file)
@@ -429,7 +429,7 @@ public final class SchemaUtils {
      */
     public static @Nullable SchemaNode findDataChildSchemaByQName(final SchemaNode node, final QName qname) {
         if (node instanceof DataNodeContainer) {
-            SchemaNode child = ((DataNodeContainer) node).getDataChildByName(qname);
+            SchemaNode child = ((DataNodeContainer) node).dataChildByName(qname);
             if (child == null && node instanceof SchemaContext) {
                 child = tryFind(((SchemaContext) node).getOperations(), qname).orElse(null);
             }
index db16fbec447dee499c619b936882d8cdbe0f7333..8d6bf20a5db4acb109bf9b9af1194dd1b2e4575c 100644 (file)
@@ -296,7 +296,7 @@ public class CompositeNodeDataWithSchema<T extends DataSchemaNode> extends Abstr
             final DataSchemaNode child) {
         if (parent instanceof AugmentationTarget && !(parent instanceof ChoiceSchemaNode)) {
             for (AugmentationSchemaNode augmentation : ((AugmentationTarget) parent).getAvailableAugmentations()) {
-                DataSchemaNode childInAugmentation = augmentation.getDataChildByName(child.getQName());
+                DataSchemaNode childInAugmentation = augmentation.dataChildByName(child.getQName());
                 if (childInAugmentation != null) {
                     return augmentation;
                 }
index 216bf478604cd5f8837e20e93963726acf21915c..8070db3c3170e30fa8c917e5408d2be5fb65fabc 100644 (file)
@@ -102,7 +102,7 @@ public abstract class DataSchemaContextNode<T extends PathArgument> extends Abst
     }
 
     static DataSchemaNode findChildSchemaNode(final DataNodeContainer parent, final QName child) {
-        final DataSchemaNode potential = parent.getDataChildByName(child);
+        final DataSchemaNode potential = parent.dataChildByName(child);
         return potential == null ? findChoice(Iterables.filter(parent.getChildNodes(), ChoiceSchemaNode.class), child)
                 : potential;
     }
index 6b5d77e2bcd26461df9eceb295b920294bf2ba11..2eb2e64c97280fe47da332ea634454385be84a5c 100644 (file)
@@ -159,94 +159,86 @@ public class SchemaContextUtilTest {
     @Test
     public void findNodeInSchemaContextTest2() {
         SchemaNode testNode = ((ContainerSchemaNode) myModule.getDataChildByName(QName.create(
-                myModule.getQNameModule(), "my-container"))).getDataChildByName(QName.create(myModule.getQNameModule(),
+                myModule.getQNameModule(), "my-container"))).dataChildByName(QName.create(myModule.getQNameModule(),
                 "my-leaf-not-in-container"));
+        assertNull(testNode);
 
         SchemaPath path = SchemaPath.create(true, QName.create(myModule.getQNameModule(), "my-container"),
                 QName.create(myModule.getQNameModule(), "my-leaf-not-in-container"));
         SchemaNode foundNode = SchemaContextUtil.findNodeInSchemaContext(context, path.getPathFromRoot());
-
-        assertNull(testNode);
         assertNull(foundNode);
 
         final RpcDefinition rpc = getRpcByName(myModule, "my-rpc");
-        testNode = rpc.getInput().getDataChildByName(QName.create(myModule.getQNameModule(), "no-input-leaf"));
+        testNode = rpc.getInput().dataChildByName(QName.create(myModule.getQNameModule(), "no-input-leaf"));
+        assertNull(testNode);
 
         path = SchemaPath.create(true, QName.create(myModule.getQNameModule(), "my-rpc"),
                 QName.create(myModule.getQNameModule(), "input"),
                 QName.create(myModule.getQNameModule(), "no-input-leaf"));
 
         foundNode = SchemaContextUtil.findNodeInSchemaContext(context, path.getPathFromRoot());
-
-        assertNull(testNode);
         assertNull(foundNode);
 
         final NotificationDefinition notification = myModule.getNotifications().iterator().next();
-        testNode = notification.getDataChildByName(QName.create(myModule.getQNameModule(), "no-notification-leaf"));
+        testNode = notification.dataChildByName(QName.create(myModule.getQNameModule(), "no-notification-leaf"));
+        assertNull(testNode);
 
         path = SchemaPath.create(true, QName.create(myModule.getQNameModule(), "my-notification"),
                 QName.create(myModule.getQNameModule(), "no-notification-leaf"));
 
         foundNode = SchemaContextUtil.findNodeInSchemaContext(context, path.getPathFromRoot());
-
-        assertNull(testNode);
         assertNull(foundNode);
 
         final GroupingDefinition grouping = getGroupingByName(myModule, "my-grouping");
         testNode = ((ContainerSchemaNode) grouping.getDataChildByName(QName.create(myModule.getQNameModule(),
-                "my-container-in-grouping"))).getDataChildByName(QName.create(myModule.getQNameModule(),
+                "my-container-in-grouping"))).dataChildByName(QName.create(myModule.getQNameModule(),
                 "no-leaf-in-grouping"));
+        assertNull(testNode);
 
         path = SchemaPath.create(true, QName.create(myModule.getQNameModule(), "my-grouping"),
                 QName.create(myModule.getQNameModule(), "my-container-in-grouping"),
                 QName.create(myModule.getQNameModule(), "no-leaf-in-grouping"));
 
         foundNode = SchemaContextUtil.findNodeInSchemaContext(context, path.getPathFromRoot());
-
-        assertNull(testNode);
         assertNull(foundNode);
 
         testNode = ((ChoiceSchemaNode) myModule
                 .getDataChildByName(QName.create(myModule.getQNameModule(), "my-choice")))
                 .findCaseNodes("one").iterator().next()
-                .getDataChildByName(QName.create(myModule.getQNameModule(), "no-choice-leaf"));
+                .dataChildByName(QName.create(myModule.getQNameModule(), "no-choice-leaf"));
+        assertNull(testNode);
 
         path = SchemaPath.create(true, QName.create(myModule.getQNameModule(), "my-choice"),
                 QName.create(myModule.getQNameModule(), "one"),
                 QName.create(myModule.getQNameModule(), "no-choice-leaf"));
         foundNode = SchemaContextUtil.findNodeInSchemaContext(context, path.getPathFromRoot());
-
-        assertNull(testNode);
         assertNull(foundNode);
 
         ListSchemaNode listNode = (ListSchemaNode) ((ContainerSchemaNode) myModule.getDataChildByName(QName.create(
                 myModule.getQNameModule(), "my-container"))).getDataChildByName(QName.create(myModule.getQNameModule(),
                 "my-list"));
 
-        testNode = listNode.getDataChildByName(QName.create(myModule.getQNameModule(), "no-leaf-in-list"));
+        testNode = listNode.dataChildByName(QName.create(myModule.getQNameModule(), "no-leaf-in-list"));
+        assertNull(testNode);
 
         path = SchemaPath.create(true, QName.create(myModule.getQNameModule(), "my-container"),
                 QName.create(myModule.getQNameModule(), "my-list"),
                 QName.create(myModule.getQNameModule(), "no-leaf-in-list"));
         foundNode = SchemaContextUtil.findNodeInSchemaContext(context, path.getPathFromRoot());
-
-        assertNull(testNode);
         assertNull(foundNode);
 
         listNode = (ListSchemaNode) ((ContainerSchemaNode) myModule.getDataChildByName(QName.create(
                 myModule.getQNameModule(), "my-container"))).getDataChildByName(QName.create(myModule.getQNameModule(),
                 "my-list"));
 
-        testNode = listNode.getDataChildByName(QName.create(myModule.getQNameModule(), "no-leaf-list-in-list"));
+        testNode = listNode.dataChildByName(QName.create(myModule.getQNameModule(), "no-leaf-list-in-list"));
+        assertNull(testNode);
 
         path = SchemaPath.create(true, QName.create(myModule.getQNameModule(), "my-container"),
                 QName.create(myModule.getQNameModule(), "my-list"),
                 QName.create(myModule.getQNameModule(), "no-leaf-list-in-list"));
         foundNode = SchemaContextUtil.findNodeInSchemaContext(context, path.getPathFromRoot());
-
-        assertNull(testNode);
         assertNull(foundNode);
-
     }
 
     @Test
index ea1a9bf677ff8c0f804180eb2ada9961a6a8df86..73bd1765d1d0cc121702ee110b85075647bec6e5 100644 (file)
@@ -388,7 +388,7 @@ public final class SchemaContextUtil {
         SchemaNode foundNode = null;
         final Iterable<QName> nextPath = nextLevel(path);
 
-        foundNode = module.getDataChildByName(current);
+        foundNode = module.dataChildByName(current);
         if (foundNode != null && nextPath.iterator().hasNext()) {
             foundNode = findNodeIn(foundNode, nextPath);
         }
@@ -436,7 +436,7 @@ public final class SchemaContextUtil {
         if (parent instanceof DataNodeContainer) {
             final DataNodeContainer parentDataNodeContainer = (DataNodeContainer) parent;
 
-            foundNode = parentDataNodeContainer.getDataChildByName(current);
+            foundNode = parentDataNodeContainer.dataChildByName(current);
             if (foundNode != null && nextPath.iterator().hasNext()) {
                 foundNode = findNodeIn(foundNode, nextPath);
             }
@@ -500,7 +500,7 @@ public final class SchemaContextUtil {
             if (foundNode == null) {
                 // fallback that tries to map into one of the child cases
                 for (final CaseSchemaNode caseNode : ((ChoiceSchemaNode) parent).getCases()) {
-                    final DataSchemaNode maybeChild = caseNode.getDataChildByName(current);
+                    final DataSchemaNode maybeChild = caseNode.dataChildByName(current);
                     if (maybeChild != null) {
                         foundNode = findNodeIn(maybeChild, nextPath);
                         break;
@@ -611,7 +611,7 @@ public final class SchemaContextUtil {
             return QName.create(module.getQNameModule(), prefixedName.next());
         }
 
-        return QName.create(parentModule.getNamespace(), parentModule.getRevision(), prefixedPathPart);
+        return QName.create(parentModule.getQNameModule(), prefixedPathPart);
     }
 
     /**
index f25b435982aa9cbe506764551456df079031fe56..8e7ab07580b591bf93a488c123606486989f06c8 100644 (file)
@@ -55,9 +55,7 @@ public class SchemaContextUtilTest {
 
         doReturn("test").when(mockModule).getName();
         doReturn("test").when(mockModule).getPrefix();
-        doReturn(NAMESPACE).when(mockModule).getNamespace();
         doReturn(QNameModule.create(NAMESPACE)).when(mockModule).getQNameModule();
-        doReturn(Optional.empty()).when(mockModule).getRevision();
     }
 
     @Test
index 1447bab49914c949444aa5a933b4340d44e882c7..41473ea2130ad913e6ce2132e4761060e99350a7 100644 (file)
@@ -60,7 +60,7 @@ public class SharedSchemaRepositoryWithFeaturesTest {
                 QName.create(module.getQNameModule(), "test-leaf-a"));
         assertNotNull(testLeafA);
 
-        final ContainerSchemaNode testContainerB = (ContainerSchemaNode) module.getDataChildByName(
+        final ContainerSchemaNode testContainerB = (ContainerSchemaNode) module.dataChildByName(
                 QName.create(module.getQNameModule(), "test-container-b"));
         assertNull(testContainerB);
 
index a99342882647c7b2876e48686585565bb0c24429..e65d6a021f11900bd3dc1060d700123aacd0d026 100644 (file)
@@ -45,12 +45,12 @@ public class ControllerStmtParserTest {
 
         boolean checked = false;
         for (final AugmentationSchemaNode augmentationSchema : module.getAugmentations()) {
-            final DataSchemaNode dataNode = augmentationSchema
-                    .getDataChildByName(QName.create(module.getQNameModule(), "dom-broker-impl"));
+            final DataSchemaNode dataNode = augmentationSchema.dataChildByName(
+                QName.create(module.getQNameModule(), "dom-broker-impl"));
             if (dataNode instanceof CaseSchemaNode) {
                 final CaseSchemaNode caseNode = (CaseSchemaNode) dataNode;
-                final DataSchemaNode dataNode2 = caseNode
-                        .getDataChildByName(QName.create(module.getQNameModule(), "async-data-broker"));
+                final DataSchemaNode dataNode2 = caseNode.dataChildByName(
+                    QName.create(module.getQNameModule(), "async-data-broker"));
                 if (dataNode2 instanceof ContainerSchemaNode) {
                     final ContainerSchemaNode containerNode = (ContainerSchemaNode) dataNode2;
                     final DataSchemaNode leaf = containerNode
index 77170fe94b9463d4e6453940b14ea8b43de9608e..b3092588221f05bbe84d3f9011d3101ec8cca06e 100644 (file)
@@ -61,7 +61,7 @@ public class DeviationResolutionTest {
         assertEquals(1, myContA.getChildNodes().size());
         assertNotNull(myContA.getDataChildByName(QName.create(importedModule.getQNameModule(), "my-leaf-a3")));
 
-        final ContainerSchemaNode myContB = (ContainerSchemaNode) importedModule.getDataChildByName(
+        final ContainerSchemaNode myContB = (ContainerSchemaNode) importedModule.dataChildByName(
                 QName.create(importedModule.getQNameModule(), "my-cont-b"));
         assertNull(myContB);
 
index d202952d8855a56345002b5b9af667ba1c61cae1..73080218fb77d70dee16cc6b799fcdf0f72821b1 100644 (file)
@@ -66,7 +66,7 @@ public class EffectiveSchemaContextTest {
         final Collection<? extends UnknownSchemaNode> unknownSchemaNodes = schemaContext.getUnknownSchemaNodes();
         assertEquals(3, unknownSchemaNodes.size());
 
-        assertNull(schemaContext.getDataChildByName(QName.create("foo-namespace", "2016-09-21", "foo-cont")));
+        assertNull(schemaContext.dataChildByName(QName.create("foo-namespace", "2016-09-21", "foo-cont")));
 
         assertFalse(schemaContext.findModule("foo", Revision.of("2016-08-21")).isPresent());
         assertFalse(schemaContext.findModule(URI.create("foo-namespace"), Revision.of("2016-08-21")).isPresent());
index 82b3dbc10989c904a1698bffbc3ad710d7b9c8e9..673e3f631d83bfd7b64c1643aa9bbf996daa6665 100644 (file)
@@ -48,7 +48,7 @@ public class IfFeatureResolutionTest {
         final Module testModule = schemaContext.findModule("foo").get();
         assertEquals(9, testModule.getChildNodes().size());
 
-        final ContainerSchemaNode testContainerA = (ContainerSchemaNode) testModule.getDataChildByName(
+        final ContainerSchemaNode testContainerA = (ContainerSchemaNode) testModule.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-container-a"));
         assertNull(testContainerA);
 
@@ -66,7 +66,7 @@ public class IfFeatureResolutionTest {
                 QName.create(testModule.getQNameModule(), "test-leaf-c"));
         assertNotNull(testLeafC);
 
-        final ContainerSchemaNode testContainerD = (ContainerSchemaNode) testModule.getDataChildByName(
+        final ContainerSchemaNode testContainerD = (ContainerSchemaNode) testModule.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-container-d"));
         assertNull(testContainerD);
 
@@ -76,14 +76,14 @@ public class IfFeatureResolutionTest {
         final ContainerSchemaNode testSubContainerE = (ContainerSchemaNode) testContainerE.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "test-subcontainer-e"));
         assertNotNull(testSubContainerE);
-        final LeafSchemaNode testLeafE = (LeafSchemaNode) testSubContainerE.getDataChildByName(
+        final LeafSchemaNode testLeafE = (LeafSchemaNode) testSubContainerE.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-leaf-e"));
         assertNull(testLeafE);
 
         final ContainerSchemaNode testContainerF = (ContainerSchemaNode) testModule.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "test-container-f"));
         assertNotNull(testContainerF);
-        final ContainerSchemaNode testSubContainerF = (ContainerSchemaNode) testContainerF.getDataChildByName(
+        final ContainerSchemaNode testSubContainerF = (ContainerSchemaNode) testContainerF.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-subcontainer-f"));
         assertNull(testSubContainerF);
 
@@ -94,7 +94,7 @@ public class IfFeatureResolutionTest {
         final LeafSchemaNode testLeafG = (LeafSchemaNode) testContainerG.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "test-leaf-g"));
         assertNotNull(testLeafG);
-        final LeafSchemaNode augmentingTestLeafG = (LeafSchemaNode) testContainerG.getDataChildByName(
+        final LeafSchemaNode augmentingTestLeafG = (LeafSchemaNode) testContainerG.dataChildByName(
                 QName.create(testModule.getQNameModule(), "augmenting-test-leaf-g"));
         assertNull(augmentingTestLeafG);
         final AnyxmlSchemaNode augmentingTestAnyxmlG = (AnyxmlSchemaNode) testContainerG.getDataChildByName(
@@ -114,7 +114,7 @@ public class IfFeatureResolutionTest {
         ContainerSchemaNode testGroupingSubContainer = (ContainerSchemaNode) testContainerI.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "test-grouping-subcontainer"));
         assertNotNull(testGroupingSubContainer);
-        final LeafSchemaNode testGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.getDataChildByName(
+        final LeafSchemaNode testGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-grouping-leaf"));
         assertNull(testGroupingLeaf);
 
@@ -136,7 +136,7 @@ public class IfFeatureResolutionTest {
         final LeafSchemaNode augmentingTestGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "augmenting-test-grouping-leaf"));
         assertNotNull(augmentingTestGroupingLeaf);
-        final LeafSchemaNode augmentingTestGroupingLeaf2 = (LeafSchemaNode) testGroupingSubContainer.getDataChildByName(
+        final LeafSchemaNode augmentingTestGroupingLeaf2 = (LeafSchemaNode) testGroupingSubContainer.dataChildByName(
                 QName.create(testModule.getQNameModule(), "augmenting-test-grouping-leaf-2"));
         assertNull(augmentingTestGroupingLeaf2);
     }
@@ -286,14 +286,14 @@ public class IfFeatureResolutionTest {
         final ContainerSchemaNode testSubContainerE = (ContainerSchemaNode) testContainerE.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "test-subcontainer-e"));
         assertNotNull(testSubContainerE);
-        final LeafSchemaNode testLeafE = (LeafSchemaNode) testSubContainerE.getDataChildByName(
+        final LeafSchemaNode testLeafE = (LeafSchemaNode) testSubContainerE.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-leaf-e"));
         assertNull(testLeafE);
 
         final ContainerSchemaNode testContainerF = (ContainerSchemaNode) testModule.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "test-container-f"));
         assertNotNull(testContainerF);
-        final ContainerSchemaNode testSubContainerF = (ContainerSchemaNode) testContainerF.getDataChildByName(
+        final ContainerSchemaNode testSubContainerF = (ContainerSchemaNode) testContainerF.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-subcontainer-f"));
         assertNull(testSubContainerF);
 
@@ -304,7 +304,7 @@ public class IfFeatureResolutionTest {
         final LeafSchemaNode testLeafG = (LeafSchemaNode) testContainerG.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "test-leaf-g"));
         assertNotNull(testLeafG);
-        final LeafSchemaNode augmentingTestLeafG = (LeafSchemaNode) testContainerG.getDataChildByName(
+        final LeafSchemaNode augmentingTestLeafG = (LeafSchemaNode) testContainerG.dataChildByName(
                 QName.create(testModule.getQNameModule(), "augmenting-test-leaf-g"));
         assertNull(augmentingTestLeafG);
         final AnyxmlSchemaNode augmentingTestAnyxmlG = (AnyxmlSchemaNode) testContainerG.getDataChildByName(
@@ -324,7 +324,7 @@ public class IfFeatureResolutionTest {
         ContainerSchemaNode testGroupingSubContainer = (ContainerSchemaNode) testContainerI.getDataChildByName(
                 QName.create(testModule.getQNameModule(), "test-grouping-subcontainer"));
         assertNotNull(testGroupingSubContainer);
-        LeafSchemaNode testGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.getDataChildByName(
+        LeafSchemaNode testGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-grouping-leaf"));
         assertNull(testGroupingLeaf);
 
@@ -336,13 +336,13 @@ public class IfFeatureResolutionTest {
                 QName.create(testModule.getQNameModule(), "test-grouping-subcontainer"));
         assertNotNull(testGroupingSubContainer);
         assertEquals(1, testGroupingSubContainer.getAvailableAugmentations().size());
-        final LeafSchemaNode augmentingTestGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.getDataChildByName(
+        final LeafSchemaNode augmentingTestGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.dataChildByName(
                 QName.create(testModule.getQNameModule(), "augmenting-test-grouping-leaf"));
         assertNull(augmentingTestGroupingLeaf);
-        final LeafSchemaNode augmentingTestGroupingLeaf2 = (LeafSchemaNode) testGroupingSubContainer.getDataChildByName(
+        final LeafSchemaNode augmentingTestGroupingLeaf2 = (LeafSchemaNode) testGroupingSubContainer.dataChildByName(
                 QName.create(testModule.getQNameModule(), "augmenting-test-grouping-leaf-2"));
         assertNull(augmentingTestGroupingLeaf2);
-        testGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.getDataChildByName(
+        testGroupingLeaf = (LeafSchemaNode) testGroupingSubContainer.dataChildByName(
                 QName.create(testModule.getQNameModule(), "test-grouping-leaf"));
         assertNull(testGroupingLeaf);
     }