X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmessages%2FAbortTransactionReplyTest.java;h=1b033546211e21b1f64e854ac77083939a6adc71;hb=HEAD;hp=bbc4da52a71324906e883af45e87859805bc3ad5;hpb=5a4560d475f0ed328275f1a5c7a5dae292acfb02;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReplyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReplyTest.java index bbc4da52a7..1b03354621 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReplyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReplyTest.java @@ -8,19 +8,21 @@ package org.opendaylight.controller.cluster.datastore.messages; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import java.io.Serializable; -import org.apache.commons.lang.SerializationUtils; +import org.apache.commons.lang3.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; /** * Unit tests for AbortTransactionReply. * * @author Thomas Pantelis */ +@Deprecated(since = "9.0.0", forRemoval = true) public class AbortTransactionReplyTest { - @Test public void testSerialization() { AbortTransactionReply expected = AbortTransactionReply.instance(DataStoreVersions.CURRENT_VERSION); @@ -32,20 +34,9 @@ public class AbortTransactionReplyTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - AbortTransactionReply expected = AbortTransactionReply.instance(DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ThreePhaseCommitCohortMessages.AbortTransactionReply.class, serialized.getClass()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, AbortTransactionReply.isSerializedType( - ThreePhaseCommitCohortMessages.AbortTransactionReply.newBuilder().build())); - - assertEquals("isSerializedType", true, AbortTransactionReply.isSerializedType(new AbortTransactionReply())); - assertEquals("isSerializedType", false, AbortTransactionReply.isSerializedType(new Object())); + assertTrue("isSerializedType", AbortTransactionReply.isSerializedType(new AbortTransactionReply())); + assertFalse("isSerializedType", AbortTransactionReply.isSerializedType(new Object())); } }