package org.opendaylight.controller.cluster.access.commands;
import com.google.common.base.MoreObjects;
+import com.google.common.collect.ImmutableRangeSet;
import org.junit.Assert;
import org.junit.Test;
import org.opendaylight.controller.cluster.access.ABIVersion;
}
@Test
- public void getMinVersionTest() throws Exception {
+ public void getMinVersionTest() {
Assert.assertEquals(MIN_VERSION, OBJECT.getMinVersion());
}
@Test
- public void getMaxVersionTest() throws Exception {
+ public void getMaxVersionTest() {
Assert.assertEquals(MAX_VERSION, OBJECT.getMaxVersion());
}
@Test
- public void toRequestFailureTest() throws Exception {
- final RequestException exception = new DeadTransactionException(0);
+ public void toRequestFailureTest() {
+ final RequestException exception = new DeadTransactionException(ImmutableRangeSet.of());
final ConnectClientFailure failure = OBJECT.toRequestFailure(exception);
Assert.assertNotNull(failure);
}
@Test
- public void cloneAsVersionTest() throws Exception {
+ public void cloneAsVersionTest() {
final ConnectClientRequest clone = OBJECT.cloneAsVersion(ABIVersion.BORON);
Assert.assertNotNull(clone);
Assert.assertEquals(ABIVersion.BORON, clone.getVersion());
}
@Test
- public void addToStringAttributesTest() throws Exception {
+ public void addToStringAttributesTest() {
final MoreObjects.ToStringHelper result = OBJECT.addToStringAttributes(MoreObjects.toStringHelper(OBJECT));
Assert.assertTrue(result.toString().contains("minVersion=" + MIN_VERSION));
Assert.assertTrue(result.toString().contains("maxVersion=" + MAX_VERSION));