Make Netty-3 dependency optional
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / commands / SkipTransactionsRequestTest.java
1 /*
2  * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.access.commands;
9
10 import static org.junit.Assert.assertEquals;
11
12 import com.google.common.primitives.UnsignedLong;
13 import java.util.List;
14 import org.junit.Test;
15 import org.opendaylight.controller.cluster.access.ABIVersion;
16
17 public class SkipTransactionsRequestTest extends AbstractTransactionRequestTest<SkipTransactionsRequest> {
18     private static final SkipTransactionsRequest OBJECT = new SkipTransactionsRequest(TRANSACTION_IDENTIFIER, 0,
19         ACTOR_REF, List.of(UnsignedLong.ONE));
20
21     public SkipTransactionsRequestTest() {
22         super(OBJECT, 109);
23     }
24
25     @Test
26     public void cloneAsVersionTest() {
27         final var clone = OBJECT.cloneAsVersion(ABIVersion.TEST_FUTURE_VERSION);
28         assertEquals(OBJECT.getSequence(), clone.getSequence());
29         assertEquals(OBJECT.getTarget(), clone.getTarget());
30         assertEquals(OBJECT.getReplyTo(), clone.getReplyTo());
31     }
32
33     @Override
34     protected void doAdditionalAssertions(final SkipTransactionsRequest deserialize) {
35         assertEquals(OBJECT.getReplyTo(), deserialize.getReplyTo());
36     }
37 }