X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-dom-it%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Ftest%2Fbugfix%2FWriteParentReadChildTest.java;h=ccedb89a2bc4db73cb6250de65c076f562612a3a;hp=dca56abcf4a40a54072628fb7c266453df7e4858;hb=f9814cf027886294b74fb6c8748f4a3e0a545e86;hpb=3a25fec0b812950c61d2fb6018407a2a6ceb5090 diff --git a/opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/WriteParentReadChildTest.java b/opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/WriteParentReadChildTest.java index dca56abcf4..ccedb89a2b 100644 --- a/opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/WriteParentReadChildTest.java +++ b/opendaylight/md-sal/sal-binding-dom-it/src/test/java/org/opendaylight/controller/sal/binding/test/bugfix/WriteParentReadChildTest.java @@ -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 TLL_INSTANCE_ID_BA = InstanceIdentifier.builder(Top.class) // - .child(TopLevelList.class, TLL_KEY).toInstance(); + private static final InstanceIdentifier TLL_INSTANCE_ID_BA = InstanceIdentifier.builder(Top.class) + .child(TopLevelList.class, TLL_KEY).build(); - private static final InstanceIdentifier LIST1_INSTANCE_ID_BA = // - TLL_INSTANCE_ID_BA.builder() // + private static final InstanceIdentifier LIST1_INSTANCE_ID_BA = + TLL_INSTANCE_ID_BA.builder() .augmentation(TllComplexAugment.class).child(List1.class, LIST1_KEY).build(); - private static final InstanceIdentifier LIST11_INSTANCE_ID_BA = // + private static final InstanceIdentifier 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 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 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());