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%2FShardDataTreeMocking.java;h=7de4835e374691b7131fe75b5d9be13492e06965;hp=b05fa9fab4891f9311cfc4a09b250b6539184526;hb=HEAD;hpb=e84f63ee098fff5b02cbce1281ca0d1208f966fa diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeMocking.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeMocking.java index b05fa9fab4..234c69e011 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeMocking.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeMocking.java @@ -23,6 +23,7 @@ import org.mockito.InOrder; import org.mockito.invocation.InvocationOnMock; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.opendaylight.controller.cluster.datastore.persisted.CommitTransactionPayload; +import org.opendaylight.yangtools.yang.common.Empty; import org.opendaylight.yangtools.yang.data.tree.api.DataTreeCandidate; public final class ShardDataTreeMocking { @@ -37,18 +38,18 @@ public final class ShardDataTreeMocking { } public static ShardDataTreeCohort immediateCanCommit(final ShardDataTreeCohort cohort) { - final FutureCallback callback = mockCallback(); - doNothing().when(callback).onSuccess(null); + final FutureCallback callback = mockCallback(); + doNothing().when(callback).onSuccess(Empty.value()); cohort.canCommit(callback); - verify(callback).onSuccess(null); + verify(callback).onSuccess(Empty.value()); verifyNoMoreInteractions(callback); return cohort; } - public static FutureCallback coordinatedCanCommit(final ShardDataTreeCohort cohort) { - final FutureCallback callback = mockCallback(); - doNothing().when(callback).onSuccess(null); + public static FutureCallback coordinatedCanCommit(final ShardDataTreeCohort cohort) { + final FutureCallback callback = mockCallback(); + doNothing().when(callback).onSuccess(Empty.value()); doNothing().when(callback).onFailure(any(Throwable.class)); cohort.canCommit(callback); return callback; @@ -102,11 +103,11 @@ public final class ShardDataTreeMocking { }).when(preCommitCallback).onSuccess(any(DataTreeCandidate.class)); doNothing().when(preCommitCallback).onFailure(any(Throwable.class)); - final FutureCallback canCommit = mockCallback(); + final FutureCallback canCommit = mockCallback(); doAnswer(invocation -> { cohort.preCommit(preCommitCallback); return null; - }).when(canCommit).onSuccess(null); + }).when(canCommit).onSuccess(Empty.value()); doNothing().when(canCommit).onFailure(any(Throwable.class)); cohort.canCommit(canCommit);