Simplify ListenerAdapterTest
[netconf.git] / restconf / restconf-nb / src / test / java / org / opendaylight / restconf / nb / rfc8040 / streams / listeners / ListenerAdapterTest.java
index 235e492674577b2eef5d47700cf37605cadd1ad2..9e1fff2771e42f60f2122591a81c2650e997330a 100644 (file)
@@ -232,7 +232,7 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
 
         WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
         final InstanceIdentifier<PatchCont> iid = InstanceIdentifier.create(PatchCont.class);
-        writeTransaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
+        writeTransaction.put(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
             .addAugmentation(new PatchCont1Builder()
                 .setPatchChoice1(new PatchCase1Builder().setCaseLeaf1("ChoiceLeaf").build())
                 .setLeaf1("AugmentLeaf")
@@ -243,7 +243,7 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         adapter.assertGot(getNotifJson(JSON_NOTIF_LEAVES_CREATE));
 
         writeTransaction = dataBroker.newWriteOnlyTransaction();
-        writeTransaction.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
+        writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
             .addAugmentation(new PatchCont1Builder()
                 .setPatchChoice1(new PatchCase1Builder().setCaseLeaf1("ChoiceUpdate").build())
                 .setLeaf1("AugmentLeaf")
@@ -273,7 +273,7 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
 
         WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
         final InstanceIdentifier<PatchCont> iid = InstanceIdentifier.create(PatchCont.class);
-        writeTransaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
+        writeTransaction.put(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
             .addAugmentation(new PatchCont1Builder()
                 .setPatchChoice2(new PatchCase11Builder()
                     .setPatchSubChoice11(new PatchSubCase11Builder()
@@ -288,7 +288,7 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         adapter.assertGot(getNotifJson(JSON_NOTIF_CHANGED_LEAVES_CREATE));
 
         writeTransaction = dataBroker.newWriteOnlyTransaction();
-        writeTransaction.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
+        writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
             .addAugmentation(new PatchCont1Builder()
                 .setPatchChoice2(new PatchCase11Builder()
                     .setPatchSubChoice11(new PatchSubCase11Builder()
@@ -324,13 +324,13 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         MyList1Builder builder = new MyList1Builder().setMyLeaf11("Jed").setName("Althea");
         final InstanceIdentifier<MyList1> iid = InstanceIdentifier.create(PatchCont.class)
                 .child(MyList1.class, new MyList1Key("Althea"));
-        writeTransaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
+        writeTransaction.put(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
         writeTransaction.commit();
         adapter.assertGot(getNotifJson(JSON_NOTIF_CREATE));
 
         writeTransaction = dataBroker.newWriteOnlyTransaction();
         builder = new MyList1Builder().withKey(new MyList1Key("Althea")).setMyLeaf12("Bertha");
-        writeTransaction.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
+        writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
         writeTransaction.commit();
         adapter.assertGot(getNotifJson(JSON_NOTIF_UPDATE));
 
@@ -354,13 +354,13 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         MyList1Builder builder = new MyList1Builder().setMyLeaf11("Jed").setName("Althea");
         InstanceIdentifier<MyList1> iid = InstanceIdentifier.create(PatchCont.class)
                 .child(MyList1.class, new MyList1Key("Althea"));
-        writeTransaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
+        writeTransaction.put(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
         writeTransaction.commit();
         adapter.assertGot(getNotifJson(JSON_NOTIF_WITHOUT_DATA_CREATE));
 
         writeTransaction = dataBroker.newWriteOnlyTransaction();
         builder = new MyList1Builder().withKey(new MyList1Key("Althea")).setMyLeaf12("Bertha");
-        writeTransaction.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
+        writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
         writeTransaction.commit();
         adapter.assertGot(getNotifJson(JSON_NOTIF_WITHOUT_DATA_UPDATE));
 
@@ -384,13 +384,13 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         MyList1Builder builder = new MyList1Builder().setMyLeaf11("Jed").setName("Althea");
         InstanceIdentifier<MyList1> iid = InstanceIdentifier.create(PatchCont.class)
                 .child(MyList1.class, new MyList1Key("Althea"));
-        writeTransaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
+        writeTransaction.put(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
         writeTransaction.commit();
         adapter.assertXmlSimilar(getResultXml(XML_NOTIF_CREATE));
 
         writeTransaction = dataBroker.newWriteOnlyTransaction();
         builder = new MyList1Builder().withKey(new MyList1Key("Althea")).setMyLeaf12("Bertha");
-        writeTransaction.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
+        writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
         writeTransaction.commit();
         adapter.assertXmlSimilar(getResultXml(XML_NOTIF_UPDATE));
 
@@ -414,13 +414,13 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         MyList1Builder builder = new MyList1Builder().setMyLeaf11("Jed").setName("Althea");
         InstanceIdentifier<MyList1> iid = InstanceIdentifier.create(PatchCont.class)
                 .child(MyList1.class, new MyList1Key("Althea"));
-        writeTransaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
+        writeTransaction.put(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
         writeTransaction.commit();
         adapter.assertXmlSimilar(getResultXml(XML_NOTIF_WITHOUT_DATA_CREATE));
 
         writeTransaction = dataBroker.newWriteOnlyTransaction();
         builder = new MyList1Builder().withKey(new MyList1Key("Althea")).setMyLeaf12("Bertha");
-        writeTransaction.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
+        writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, iid, builder.build());
         writeTransaction.commit();
         adapter.assertXmlSimilar(getResultXml(XML_NOTIF_WITHOUT_DATA_UPDATE));
 
@@ -442,7 +442,7 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         changeService.registerDataTreeChangeListener(root, adapter);
         WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
         final InstanceIdentifier<PatchCont> iid = InstanceIdentifier.create(PatchCont.class);
-        writeTransaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
+        writeTransaction.put(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
             .addAugmentation(new PatchCont1Builder()
                 .setPatchChoice1(new PatchCase1Builder().setCaseLeaf1("ChoiceLeaf").build())
                 .setLeaf1("AugmentLeaf")
@@ -453,7 +453,7 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         adapter.assertXmlSimilar(getResultXml(XML_NOTIF_LEAVES_CREATE));
 
         writeTransaction = dataBroker.newWriteOnlyTransaction();
-        writeTransaction.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
+        writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
             .addAugmentation(new PatchCont1Builder()
                 .setPatchChoice1(new PatchCase1Builder().setCaseLeaf1("ChoiceUpdate").build())
                 .setLeaf1("AugmentLeaf")
@@ -488,7 +488,7 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         changeService.registerDataTreeChangeListener(root, adapter);
         WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
         final InstanceIdentifier<PatchCont> iid = InstanceIdentifier.create(PatchCont.class);
-        writeTransaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
+        writeTransaction.put(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
             .addAugmentation(new PatchCont1Builder()
                 .setPatchChoice2(new PatchCase11Builder()
                     .setPatchSubChoice11(new PatchSubCase11Builder()
@@ -503,7 +503,7 @@ public class ListenerAdapterTest extends AbstractConcurrentDataBrokerTest {
         adapter.assertXmlSimilar(getResultXml(XML_NOTIF_CHANGED_LEAVES_CREATE));
 
         writeTransaction = dataBroker.newWriteOnlyTransaction();
-        writeTransaction.mergeParentStructureMerge(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
+        writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, iid, new PatchContBuilder()
             .addAugmentation(new PatchCont1Builder()
                 .setPatchChoice2(new PatchCase11Builder()
                     .setPatchSubChoice11(new PatchSubCase11Builder()