Use current ABIVersion for testing
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / databroker / actors / dds / TestUtils.java
index 977ada54e63f7e47640d5a98e7d08b19676efb57..f4e0be9c3d9f64b5f8607732da2b6d4ef93bbad0 100644 (file)
@@ -7,9 +7,10 @@
  */
 package org.opendaylight.controller.cluster.databroker.actors.dds;
 
+import static org.junit.Assert.assertEquals;
+
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
-import org.junit.Assert;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.FrontendIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.FrontendType;
@@ -17,7 +18,11 @@ import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifie
 import org.opendaylight.controller.cluster.access.concepts.MemberName;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 
-class TestUtils {
+final class TestUtils {
+    @FunctionalInterface
+    public interface RunnableWithException {
+        void run() throws Exception;
+    }
 
     static final MemberName MEMBER_NAME = MemberName.forName("member-1");
     static final FrontendType FRONTEND_TYPE = FrontendType.forName("type-1");
@@ -26,13 +31,12 @@ class TestUtils {
     static final LocalHistoryIdentifier HISTORY_ID = new LocalHistoryIdentifier(CLIENT_ID, 0L);
     static final TransactionIdentifier TRANSACTION_ID = new TransactionIdentifier(HISTORY_ID, 0L);
 
-    @FunctionalInterface
-    public interface RunnableWithException {
-        void run() throws Exception;
-    }
-
     private static final long TIMEOUT = 3;
 
+    private TestUtils() {
+
+    }
+
     /**
      * Asserts, that future result when it completes is equal to given object.
      * Future must complete in {@link TestUtils#TIMEOUT} seconds.
@@ -42,8 +46,8 @@ class TestUtils {
      * @param <T>      type
      * @throws Exception exception
      */
-    static <T> void assertFutureEquals(final T expected, final Future<T> actual) throws Exception {
-        Assert.assertEquals(expected, getWithTimeout(actual));
+    static <T> void assertFutureEquals(final T expected, final Future<? extends T> actual) throws Exception {
+        assertEquals(expected, getWithTimeout(actual));
     }
 
     /**