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%2Fmodification%2FWriteModificationTest.java;h=20409999d804d7a60bc193e346e117791263a21b;hp=416b9ae0ef95cc9063149ad6e8de23e1e1226e84;hb=6cb5520bf2828671eee714aaae66b3a6b9038299;hpb=f0c5113627c58b99f39c0d4acd0f65960106c97f diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/WriteModificationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/WriteModificationTest.java index 416b9ae0ef..20409999d8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/WriteModificationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/WriteModificationTest.java @@ -14,10 +14,9 @@ import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier; +import org.opendaylight.yangtools.yang.data.impl.schema.Builders; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; -import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableContainerNodeBuilder; public class WriteModificationTest extends AbstractModificationTest { @Test @@ -34,12 +33,10 @@ public class WriteModificationTest extends AbstractModificationTest { @Test public void testSerialization() { - YangInstanceIdentifier path = TestModel.TEST_PATH; - NormalizedNode data = ImmutableContainerNodeBuilder.create() - .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(TestModel.TEST_QNAME)) - .withChild(ImmutableNodes.leafNode(TestModel.DESC_QNAME, "foo")).build(); - - WriteModification expected = new WriteModification(path, data); + WriteModification expected = new WriteModification(TestModel.TEST_PATH, Builders.containerBuilder() + .withNodeIdentifier(new NodeIdentifier(TestModel.TEST_QNAME)) + .withChild(ImmutableNodes.leafNode(TestModel.DESC_QNAME, "foo")) + .build()); WriteModification clone = (WriteModification) SerializationUtils.clone(expected); assertEquals("getPath", expected.getPath(), clone.getPath());