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=234c69e011bd05a978d13b6927b418a191fb8cf5;hp=7de4835e374691b7131fe75b5d9be13492e06965;hb=118cd0216b0c6b0ec1a01689ec2025a13e090861;hpb=466078ab1dc8a8cc2981b161051f6edecd6af85a 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 7de4835e37..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,7 +23,8 @@ 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.data.api.schema.tree.DataTreeCandidate; +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);