Cleanup AbstractDOMBrokerWriteTransactionTest
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / databroker / AbstractDOMBrokerWriteTransactionTest.java
index 1680a79..e77f645 100644 (file)
@@ -15,20 +15,19 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.concurrent.ExecutionException;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction;
 
+@RunWith(MockitoJUnitRunner.StrictStubs.class)
 public class AbstractDOMBrokerWriteTransactionTest {
-
     @Mock
-    private AbstractDOMTransactionFactory abstractDOMTransactionFactory;
-
+    private AbstractDOMTransactionFactory<?> abstractDOMTransactionFactory;
     @Mock
     private DOMStoreWriteTransaction domStoreWriteTransaction;
 
@@ -40,7 +39,7 @@ public class AbstractDOMBrokerWriteTransactionTest {
         }
 
         @Override
-        protected DOMStoreWriteTransaction createTransaction(LogicalDatastoreType key) {
+        protected DOMStoreWriteTransaction createTransaction(final LogicalDatastoreType key) {
             return null;
         }
 
@@ -50,11 +49,6 @@ public class AbstractDOMBrokerWriteTransactionTest {
         }
     }
 
-    @Before
-    public void setup() {
-        MockitoAnnotations.initMocks(this);
-    }
-
     @Test
     public void readyRuntimeExceptionAndCancel() throws InterruptedException {
         RuntimeException thrown = new RuntimeException();