Shift Builder<P> from toInstance() to build()
[yangtools.git] / restconf / restconf-util / src / test / java / org / opendaylight / yangtools / restconf / utils / Bug1196Test.java
index ac5d868d39d3a8b2eb603a5018204e71b992c717..7b8be180a53b50a61c781eb0750e37529d167b91 100644 (file)
@@ -7,8 +7,8 @@
  */
 package org.opendaylight.yangtools.restconf.utils;
 
-import static junit.framework.Assert.assertNotNull;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.io.InputStream;
 import java.util.AbstractMap.SimpleEntry;
@@ -63,7 +63,7 @@ public class Bug1196Test {
     @Test
     public void testXmlDataToDataObjectLinuxCase() {
         final InstanceIdentifier<Topology> instanceIdentifier = InstanceIdentifier.builder(NetworkTopology.class)
-                .child(Topology.class, new TopologyKey(new TopologyId("example-pcep-topology"))).toInstance();
+                .child(Topology.class, new TopologyKey(new TopologyId("example-pcep-topology"))).build();
         final InputStream is = this.getClass().getClassLoader().getResourceAsStream("topology-bug1196-linux.xml");
         final DataSchemaNode dataSchema = RestconfUtils.toRestconfIdentifier(instanceIdentifier, this.mappingService,
                 this.mappingService.getSchemaContext()).getValue();
@@ -82,7 +82,7 @@ public class Bug1196Test {
         VsTlv vsTlv = tlvs.getVsTlv();
         assertNotNull(vsTlv.getVendorPayload());
 
-        Entry<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, CompositeNode> domPcc = mappingService.toDataDom(new SimpleEntry<InstanceIdentifier<?>,DataObject>(PATH_TO_CLIENT,pcc));
+        Entry<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, CompositeNode> domPcc = mappingService.toDataDom(new SimpleEntry<InstanceIdentifier<?>,DataObject>(PATH_TO_CLIENT,pcc));
         CompositeNode domPccValue = domPcc.getValue();
         assertNotNull(domPccValue);
         CompositeNode domPccTlvs = getFirstReportedLspVsTlvs(domPccValue);
@@ -98,7 +98,7 @@ public class Bug1196Test {
     @Test
     public void testXmlDataToDataObjectUnixCase() {
         final InstanceIdentifier<Topology> instanceIdentifier = InstanceIdentifier.builder(NetworkTopology.class)
-                .child(Topology.class, new TopologyKey(new TopologyId("example-pcep-topology"))).toInstance();
+                .child(Topology.class, new TopologyKey(new TopologyId("example-pcep-topology"))).build();
         final InputStream is = this.getClass().getClassLoader().getResourceAsStream("topology-bug1196-unix.xml");
         final DataSchemaNode dataSchema = RestconfUtils.toRestconfIdentifier(instanceIdentifier, this.mappingService,
                 this.mappingService.getSchemaContext()).getValue();
@@ -117,7 +117,7 @@ public class Bug1196Test {
         VsTlv vsTlv = tlvs.getVsTlv();
         assertNotNull(vsTlv.getVendorPayload());
 
-        Entry<org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, CompositeNode> domPcc = mappingService.toDataDom(new SimpleEntry<InstanceIdentifier<?>,DataObject>(PATH_TO_CLIENT,pcc));
+        Entry<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, CompositeNode> domPcc = mappingService.toDataDom(new SimpleEntry<InstanceIdentifier<?>,DataObject>(PATH_TO_CLIENT,pcc));
         CompositeNode domPccValue = domPcc.getValue();
         assertNotNull(domPccValue);
         CompositeNode domPccTlvs = getFirstReportedLspVsTlvs(domPccValue);