Add XMLNamespace
[yangtools.git] / yang / yang-data-impl / src / test / java / org / opendaylight / yangtools / yang / data / impl / schema / NormalizedDataBuilderTest.java
index 7e9a77a335df98fd612c28a521ef44f1bb8c04cb..8073f21ab608384621bdac48a9c39b74bd4ce9d0 100644 (file)
@@ -11,12 +11,12 @@ import static com.google.common.base.Preconditions.checkState;
 
 import com.google.common.collect.ImmutableSet;
 import java.io.File;
-import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Collections;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.XMLNamespace;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
@@ -70,9 +70,8 @@ public class NormalizedDataBuilderTest {
         LeafSetNode<Integer> leafList = Builders.<Integer>leafSetBuilder()
                 .withNodeIdentifier(getNodeIdentifier("leaf"))
                 .withChildValue(1)
-                .withChild(
-                        Builders.<Integer>leafSetEntryBuilder()
-                                .withNodeIdentifier(getNodeWithValueIdentifier("leaf", 3)).withValue(3).build())
+                .withChild(Builders.<Integer>leafSetEntryBuilder()
+                        .withNodeIdentifier(getNodeWithValueIdentifier("leaf", 3)).withValue(3).build())
                 .build();
         builder.withChild(leafList);
 
@@ -116,8 +115,10 @@ public class NormalizedDataBuilderTest {
         builder.withChild(leafChild);
 
         LeafListSchemaNode leafListSchemaNode = (LeafListSchemaNode) getSchemaNode(schema, "test", "leafList");
-        LeafSetNode<Integer> leafList = Builders.<Integer>leafSetBuilder(leafListSchemaNode).withChildValue(1)
-                .withChild(Builders.<Integer>leafSetEntryBuilder(leafListSchemaNode).withValue(3).build()).build();
+        LeafSetNode<Integer> leafList = Builders.<Integer>leafSetBuilder(leafListSchemaNode)
+                .withChildValue(1)
+                .withChild(Builders.<Integer>leafSetEntryBuilder(leafListSchemaNode).withValue(3).build())
+                .build();
         builder.withChild(leafList);
 
         ListSchemaNode listSchema = (ListSchemaNode) getSchemaNode(schema, "test", "list");
@@ -178,7 +179,7 @@ public class NormalizedDataBuilderTest {
     }
 
     private static QName getQName(final String localName) {
-        return QName.create(URI.create("namespace"), localName);
+        return QName.create(XMLNamespace.of("namespace"), localName);
     }
 
     private static NodeIdentifier getNodeIdentifier(final String localName) {
@@ -208,7 +209,7 @@ public class NormalizedDataBuilderTest {
                     return retVal;
                 }
             } else if (dataSchemaNode instanceof ChoiceSchemaNode) {
-                for (CaseSchemaNode caseNode : ((ChoiceSchemaNode) dataSchemaNode).getCases().values()) {
+                for (CaseSchemaNode caseNode : ((ChoiceSchemaNode) dataSchemaNode).getCases()) {
                     DataSchemaNode retVal = findChildNode(caseNode, name);
                     if (retVal != null) {
                         return retVal;