Track skipped transactions
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / commands / SkipTransactionsResponseTest.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.hamcrest.CoreMatchers.instanceOf;
11 import static org.hamcrest.MatcherAssert.assertThat;
12 import static org.junit.Assert.assertEquals;
13
14 import org.junit.Test;
15 import org.opendaylight.controller.cluster.access.ABIVersion;
16
17 public class SkipTransactionsResponseTest extends AbstractTransactionSuccessTest<SkipTransactionsResponse> {
18     private static final SkipTransactionsResponse OBJECT = new SkipTransactionsResponse(
19             TRANSACTION_IDENTIFIER, 0);
20
21     @Override
22     protected SkipTransactionsResponse object() {
23         return OBJECT;
24     }
25
26     @Test
27     public void cloneAsVersionTest() {
28         final SkipTransactionsResponse clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
29         assertEquals(OBJECT, clone);
30     }
31
32     @Override
33     protected void doAdditionalAssertions(final Object deserialize) {
34         assertThat(deserialize, instanceOf(SkipTransactionsResponse.class));
35     }
36 }