Fixup Augmentable and Identifiable methods changing
[controller.git] / opendaylight / md-sal / sal-binding-dom-it / src / test / java / org / opendaylight / controller / sal / binding / test / bugfix / WriteParentReadChildTest.java
index dca56abcf4a40a54072628fb7c266453df7e4858..ccedb89a2bc4db73cb6250de65c076f562612a3a 100644 (file)
@@ -43,14 +43,14 @@ public class WriteParentReadChildTest extends AbstractDataServiceTest {
     private static final List11Key LIST11_KEY = new List11Key(LIST11_ID);
     private static final List1Key LIST1_KEY = new List1Key(LIST1_NAME);
 
-    private static final InstanceIdentifier<TopLevelList> TLL_INSTANCE_ID_BA = InstanceIdentifier.builder(Top.class) //
-            .child(TopLevelList.class, TLL_KEY).toInstance();
+    private static final InstanceIdentifier<TopLevelList> TLL_INSTANCE_ID_BA = InstanceIdentifier.builder(Top.class)
+            .child(TopLevelList.class, TLL_KEY).build();
 
-    private static final InstanceIdentifier<List1> LIST1_INSTANCE_ID_BA = //
-            TLL_INSTANCE_ID_BA.builder() //
+    private static final InstanceIdentifier<List1> LIST1_INSTANCE_ID_BA =
+            TLL_INSTANCE_ID_BA.builder()
             .augmentation(TllComplexAugment.class).child(List1.class, LIST1_KEY).build();
 
-    private static final InstanceIdentifier<? extends DataObject> LIST11_INSTANCE_ID_BA = //
+    private static final InstanceIdentifier<? extends DataObject> LIST11_INSTANCE_ID_BA =
             LIST1_INSTANCE_ID_BA.child(List11.class, LIST11_KEY);
 
     /**
@@ -64,22 +64,18 @@ public class WriteParentReadChildTest extends AbstractDataServiceTest {
         DataBroker dataBroker = testContext.getDataBroker();
         final WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
 
-        List11 list11 = new List11Builder() //
-                .setKey(LIST11_KEY) //
-                .setAttrStr("primary")
-                .build();
-
-        List1 list1 = new List1Builder().setKey(LIST1_KEY).setList11(ImmutableList.of(list11)).build();
+        List11 list11 = new List11Builder().withKey(LIST11_KEY).setAttrStr("primary").build();
+        List1 list1 = new List1Builder().withKey(LIST1_KEY).setList11(ImmutableList.of(list11)).build();
 
         transaction.put(LogicalDatastoreType.OPERATIONAL, LIST1_INSTANCE_ID_BA, list1, true);
         transaction.submit().get(5, TimeUnit.SECONDS);
 
         Optional<List1> readList1 = dataBroker.newReadOnlyTransaction().read(LogicalDatastoreType.OPERATIONAL,
-                LIST1_INSTANCE_ID_BA).checkedGet(1000, TimeUnit.MILLISECONDS);
+                LIST1_INSTANCE_ID_BA).get(1000, TimeUnit.MILLISECONDS);
         assertTrue(readList1.isPresent());
 
         Optional<? extends DataObject> readList11 = dataBroker.newReadOnlyTransaction().read(
-                LogicalDatastoreType.OPERATIONAL, LIST11_INSTANCE_ID_BA).checkedGet(5, TimeUnit.SECONDS);
+                LogicalDatastoreType.OPERATIONAL, LIST11_INSTANCE_ID_BA).get(5, TimeUnit.SECONDS);
         assertNotNull("Readed flow should not be null.",readList11);
         assertTrue(readList11.isPresent());
         assertEquals(list11, readList11.get());