2 * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.controller.cluster.access.commands;
10 import static org.hamcrest.CoreMatchers.instanceOf;
11 import static org.hamcrest.MatcherAssert.assertThat;
12 import static org.junit.Assert.assertEquals;
14 import com.google.common.primitives.UnsignedLong;
15 import java.util.List;
16 import org.junit.Test;
17 import org.opendaylight.controller.cluster.access.ABIVersion;
19 public class SkipTransactionsRequestTest extends AbstractTransactionRequestTest<SkipTransactionsRequest> {
20 private static final SkipTransactionsRequest OBJECT = new SkipTransactionsRequest(
21 TRANSACTION_IDENTIFIER, 0, ACTOR_REF, List.of(UnsignedLong.ONE));
24 protected SkipTransactionsRequest object() {
29 public void cloneAsVersionTest() {
30 final SkipTransactionsRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
31 assertEquals(OBJECT, clone);
35 protected void doAdditionalAssertions(final Object deserialize) {
36 assertThat(deserialize, instanceOf(SkipTransactionsRequest.class));
37 assertEquals(OBJECT.getReplyTo(), ((SkipTransactionsRequest) deserialize).getReplyTo());