Bump cds-access-api ABIVersion
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / commands / LocalHistorySuccessTest.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies 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 import static org.junit.Assert.assertTrue;
12
13 import org.junit.Test;
14 import org.opendaylight.controller.cluster.access.ABIVersion;
15
16 public class LocalHistorySuccessTest extends AbstractRequestSuccessTest<LocalHistorySuccess> {
17     private static final LocalHistorySuccess OBJECT = new LocalHistorySuccess(HISTORY_IDENTIFIER, 0);
18
19     @Override
20     protected LocalHistorySuccess object() {
21         return OBJECT;
22     }
23
24     @Test
25     public void cloneAsVersionTest() {
26         final LocalHistorySuccess clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
27         assertEquals(ABIVersion.BORON, clone.getVersion());
28         assertEquals(OBJECT.getSequence(), clone.getSequence());
29         assertEquals(OBJECT.getTarget(), clone.getTarget());
30     }
31
32     @Override
33     protected void doAdditionalAssertions(final Object deserialize) {
34         assertTrue(deserialize instanceof LocalHistorySuccess);
35     }
36 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.