X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Futil%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Futil%2Fconcurrent%2FAsyncNotifyingListeningExecutorServiceTest.java;h=635753467c9a3abfea2945151aadf8b43951328d;hb=refs%2Fchanges%2F09%2F42509%2F1;hp=1a3bf0d4fd702879016c0d05e25168d96e6c7e9b;hpb=b655d5e1807cf5fca0f8a4c0ecc8da565bd923c7;p=yangtools.git diff --git a/common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/AsyncNotifyingListeningExecutorServiceTest.java b/common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/AsyncNotifyingListeningExecutorServiceTest.java index 1a3bf0d4fd..635753467c 100644 --- a/common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/AsyncNotifyingListeningExecutorServiceTest.java +++ b/common/util/src/test/java/org/opendaylight/yangtools/util/concurrent/AsyncNotifyingListeningExecutorServiceTest.java @@ -11,32 +11,28 @@ package org.opendaylight.yangtools.util.concurrent; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.opendaylight.yangtools.util.concurrent.CommonTestUtils.SUBMIT_CALLABLE; +import static org.opendaylight.yangtools.util.concurrent.CommonTestUtils.SUBMIT_RUNNABLE; +import static org.opendaylight.yangtools.util.concurrent.CommonTestUtils.SUBMIT_RUNNABLE_WITH_RESULT; +import com.google.common.collect.Lists; +import com.google.common.util.concurrent.FutureCallback; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; - import org.junit.After; import org.junit.Test; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.doReturn; - -import com.google.common.collect.Lists; -import com.google.common.util.concurrent.FutureCallback; -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; -import com.google.common.util.concurrent.ThreadFactoryBuilder; - -import static org.opendaylight.yangtools.util.concurrent.CommonTestUtils.Invoker; -import static org.opendaylight.yangtools.util.concurrent.CommonTestUtils.SUBMIT_CALLABLE; -import static org.opendaylight.yangtools.util.concurrent.CommonTestUtils.SUBMIT_RUNNABLE; -import static org.opendaylight.yangtools.util.concurrent.CommonTestUtils.SUBMIT_RUNNABLE_WITH_RESULT; +import org.opendaylight.yangtools.util.concurrent.CommonTestUtils.Invoker; /** * Unit tests for AsyncNotifyingListeningExecutorService. @@ -50,11 +46,11 @@ public class AsyncNotifyingListeningExecutorServiceTest { @After public void tearDown() { - if( listenerExecutor != null ) { + if (listenerExecutor != null ) { listenerExecutor.shutdownNow(); } - if( testExecutor != null ) { + if (testExecutor != null ) { testExecutor.shutdownNow(); } } @@ -113,7 +109,7 @@ public class AsyncNotifyingListeningExecutorServiceTest { assertTrue( "ListenableFuture callback was not notified of onSuccess", futureNotifiedLatch.await( 5, TimeUnit.SECONDS ) ); - if( assertError.get() != null ) { + if (assertError.get() != null ) { throw assertError.get(); } @@ -126,7 +122,7 @@ public class AsyncNotifyingListeningExecutorServiceTest { assertTrue( "ListenableFuture callback was not notified of onSuccess", futureNotifiedLatch.await( 5, TimeUnit.SECONDS ) ); - if( assertError.get() != null ) { + if (assertError.get() != null ) { throw assertError.get(); } }