X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcds-access-api%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Faccess%2Fcommands%2FSkipTransactionsRequestTest.java;fp=opendaylight%2Fmd-sal%2Fcds-access-api%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Faccess%2Fcommands%2FSkipTransactionsRequestTest.java;h=39076e30072b1cb95e175ce51ac41fe66b6e6ac7;hp=0000000000000000000000000000000000000000;hb=c7078128d6f35eebee2f98108ff929dcccfc322d;hpb=e131c3498d286ff14890120ff5e9020ba89f10f9 diff --git a/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/SkipTransactionsRequestTest.java b/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/SkipTransactionsRequestTest.java new file mode 100644 index 0000000000..39076e3007 --- /dev/null +++ b/opendaylight/md-sal/cds-access-api/src/test/java/org/opendaylight/controller/cluster/access/commands/SkipTransactionsRequestTest.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.cluster.access.commands; + +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertEquals; + +import com.google.common.primitives.UnsignedLong; +import java.util.List; +import org.junit.Test; +import org.opendaylight.controller.cluster.access.ABIVersion; + +public class SkipTransactionsRequestTest extends AbstractTransactionRequestTest { + private static final SkipTransactionsRequest OBJECT = new SkipTransactionsRequest( + TRANSACTION_IDENTIFIER, 0, ACTOR_REF, List.of(UnsignedLong.ONE)); + + @Override + protected SkipTransactionsRequest object() { + return OBJECT; + } + + @Test + public void cloneAsVersionTest() { + final SkipTransactionsRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON); + assertEquals(OBJECT, clone); + } + + @Override + protected void doAdditionalAssertions(final Object deserialize) { + assertThat(deserialize, instanceOf(SkipTransactionsRequest.class)); + assertEquals(OBJECT.getReplyTo(), ((SkipTransactionsRequest) deserialize).getReplyTo()); + } +} \ No newline at end of file