X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmessages%2FDataChangedTest.java;h=52e213232257166fe1b63c117b1886b5be67d9c8;hp=2c1de7f1e376c1081cc51e61c8b44994eac96d16;hb=bd11e415d86b815a30e3559e199f1ad4637bd02b;hpb=989c3723e634bf4a0fb671246c31eadf255c462c diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataChangedTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataChangedTest.java index 2c1de7f1e3..52e2132322 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataChangedTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataChangedTest.java @@ -8,6 +8,7 @@ package org.opendaylight.controller.cluster.datastore.messages; import static org.junit.Assert.assertEquals; + import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; @@ -26,22 +27,23 @@ public class DataChangedTest { @Test public void testSerialization() { - DOMImmutableDataChangeEvent change = DOMImmutableDataChangeEvent.builder(DataChangeScope.SUBTREE). - addCreated(TestModel.TEST_PATH, ImmutableContainerNodeBuilder.create().withNodeIdentifier( - new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)). - withChild(ImmutableNodes.leafNode(TestModel.DESC_QNAME, "foo")).build()). - addUpdated(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME), - ImmutableContainerNodeBuilder.create().withNodeIdentifier( - new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)). - withChild(ImmutableNodes.leafNode(TestModel.NAME_QNAME, "bar")).build()) -. - addRemoved(TestModel.OUTER_LIST_PATH, - ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME).build()). - setBefore(ImmutableNodes.containerNode(TestModel.TEST_QNAME)). - setAfter(ImmutableContainerNodeBuilder.create().withNodeIdentifier( - new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)). - withChild(ImmutableNodes.leafNode(TestModel.DESC_QNAME, "foo")). - withChild(ImmutableNodes.leafNode(TestModel.NAME_QNAME, "bar")).build()).build(); + DOMImmutableDataChangeEvent change = DOMImmutableDataChangeEvent.builder(DataChangeScope.SUBTREE) + .addCreated(TestModel.TEST_PATH, + ImmutableContainerNodeBuilder.create() + .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)) + .withChild(ImmutableNodes.leafNode(TestModel.DESC_QNAME, "foo")).build()) + .addUpdated(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME), + ImmutableContainerNodeBuilder.create() + .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)) + .withChild(ImmutableNodes.leafNode(TestModel.NAME_QNAME, "bar")).build()) + .addRemoved(TestModel.OUTER_LIST_PATH, + ImmutableNodes.mapNodeBuilder(TestModel.OUTER_LIST_QNAME).build()) + .setBefore(ImmutableNodes.containerNode(TestModel.TEST_QNAME)) + .setAfter(ImmutableContainerNodeBuilder.create() + .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)) + .withChild(ImmutableNodes.leafNode(TestModel.DESC_QNAME, "foo")) + .withChild(ImmutableNodes.leafNode(TestModel.NAME_QNAME, "bar")).build()) + .build(); DataChanged expected = new DataChanged(change);