Clean up use of MockitoAnnotations.initMocks
[controller.git] / opendaylight / md-sal / cds-access-client / src / test / java / org / opendaylight / controller / cluster / access / client / ConnectingClientConnectionTest.java
index d0ffa02..d566e0e 100644 (file)
@@ -33,9 +33,10 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.controller.cluster.access.ABIVersion;
 import org.opendaylight.controller.cluster.access.concepts.AbstractRequestFailureProxy;
 import org.opendaylight.controller.cluster.access.concepts.AbstractRequestProxy;
@@ -52,9 +53,8 @@ import scala.concurrent.duration.FiniteDuration;
 /**
  * Test suite covering logic contained in {@link ConnectingClientConnection}. It assumes {@link ConnectionEntryTest}
  * passes.
- *
- * @author Robert Varga
  */
+@RunWith(MockitoJUnitRunner.class)
 public class ConnectingClientConnectionTest {
     private static class MockFailure extends RequestFailure<WritableIdentifier, MockFailure> {
         private static final long serialVersionUID = 1L;
@@ -136,8 +136,6 @@ public class ConnectingClientConnectionTest {
 
     @Before
     public void setup() {
-        MockitoAnnotations.initMocks(this);
-
         doNothing().when(mockCallback).accept(any(MockFailure.class));
 
         ticker = new FakeTicker();

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.