Fix warnings in tests
[controller.git] / opendaylight / md-sal / cds-access-api / src / test / java / org / opendaylight / controller / cluster / access / commands / AbstractLocalTransactionRequestTest.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 org.apache.commons.lang.SerializationUtils;
11 import org.junit.Assert;
12 import org.junit.Test;
13 import org.opendaylight.controller.cluster.access.ABIVersion;
14
15 public abstract class AbstractLocalTransactionRequestTest<T extends AbstractLocalTransactionRequest<?>>
16         extends AbstractTransactionRequestTest<T> {
17     @Override
18     protected abstract T object();
19
20     @Test
21     public void cloneAsVersionTest() {
22         Assert.assertEquals(object(), object().cloneAsVersion(ABIVersion.BORON));
23     }
24
25     @Override
26     @Test(expected = UnsupportedOperationException.class)
27     public void serializationTest() {
28         SerializationUtils.clone(object());
29     }
30 }