X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FSimpleShardDataTreeCohortTest.java;h=65cf2eac375ee5e3fd6b1ed912361ded25899f3c;hp=94617ed4c682d65e444950b8d918b66eea1e81f2;hb=d73c2f32f32d48fbe1b86710fb52813fa728b403;hpb=585a802c9a0a53dff2dc7ce85a542e6affbe58dc diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java index 94617ed4c6..65cf2eac37 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java @@ -23,8 +23,9 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; 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.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.tree.ConflictingModificationAppliedException; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate; @@ -37,6 +38,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailed * * @author Thomas Pantelis */ +@RunWith(MockitoJUnitRunner.StrictStubs.class) public class SimpleShardDataTreeCohortTest extends AbstractTest { @Mock private ShardDataTree mockShardDataTree; @@ -54,8 +56,6 @@ public class SimpleShardDataTreeCohortTest extends AbstractTest { @Before public void setup() { - MockitoAnnotations.initMocks(this); - doReturn(Optional.empty()).when(mockUserCohorts).commit(); doReturn(Optional.empty()).when(mockUserCohorts).abort();