2 * Copyright (c) 2017 Pantheon Technologies 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 org.apache.commons.lang.SerializationUtils;
11 import org.junit.Assert;
12 import org.junit.Test;
13 import org.opendaylight.controller.cluster.access.ABIVersion;
15 public abstract class AbstractLocalTransactionRequestTest<T extends AbstractLocalTransactionRequest<?>>
16 extends AbstractTransactionRequestTest<T> {
18 protected abstract T object();
21 public void cloneAsVersionTest() {
22 Assert.assertEquals(object(), object().cloneAsVersion(ABIVersion.BORON));
26 @Test(expected = UnsupportedOperationException.class)
27 public void serializationTest() {
28 SerializationUtils.clone(object());