X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FTransactionContextWrapperTest.java;h=2683bf7e25fe868b0bcacf64823fe5407578e014;hb=refs%2Fchanges%2F61%2F96761%2F2;hp=888a9e6f9306b0cefdf2f984f65ff8187c4e66a8;hpb=6a0fab98dc4d16a52922c6594f99a97d4050e800;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapperTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapperTest.java index 888a9e6f93..2683bf7e25 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapperTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapperTest.java @@ -5,7 +5,6 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.controller.cluster.datastore; import static org.junit.Assert.assertEquals; @@ -14,13 +13,15 @@ import static org.mockito.Mockito.mock; import org.junit.Before; import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opendaylight.controller.cluster.datastore.utils.ActorContext; +import org.mockito.junit.MockitoJUnitRunner; +import org.opendaylight.controller.cluster.datastore.utils.ActorUtils; +@RunWith(MockitoJUnitRunner.StrictStubs.class) public class TransactionContextWrapperTest { @Mock - private ActorContext actorContext; + private ActorUtils actorUtils; @Mock private TransactionContext transactionContext; @@ -29,10 +30,9 @@ public class TransactionContextWrapperTest { @Before public void setUp() { - MockitoAnnotations.initMocks(this); - doReturn(DatastoreContext.newBuilder().build()).when(actorContext).getDatastoreContext(); + doReturn(DatastoreContext.newBuilder().build()).when(actorUtils).getDatastoreContext(); transactionContextWrapper = new TransactionContextWrapper(MockIdentifiers.transactionIdentifier( - TransactionContextWrapperTest.class, "mock"), actorContext, "mock"); + TransactionContextWrapperTest.class, "mock"), actorUtils, "mock"); } @Test