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%2Fdatabroker%2Factors%2Fdds%2FRemoteProxyTransactionTest.java;h=41847973fb04f6532b6b9d25dbbc3cf38eee86e9;hb=HEAD;hp=6afecf36b8e300da316b871b750249302e0e5b8f;hpb=abaef4a5ae37f27542155457fe7306a4662b1eeb;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/RemoteProxyTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/RemoteProxyTransactionTest.java index 6afecf36b8..41847973fb 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/RemoteProxyTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/RemoteProxyTransactionTest.java @@ -12,7 +12,6 @@ import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.isA; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.assertFutureEquals; import akka.testkit.TestProbe; @@ -41,13 +40,13 @@ import org.opendaylight.controller.cluster.access.commands.TransactionWrite; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; +import org.opendaylight.yangtools.yang.data.tree.api.DataTreeSnapshot; public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest { - @Override protected RemoteProxyTransaction createTransaction(final ProxyHistory parent, final TransactionIdentifier id, final DataTreeSnapshot snapshot) { + mockForRemote(); return new RemoteProxyTransaction(parent, TRANSACTION_ID, false, false, false); } @@ -101,8 +100,7 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest result = transaction.directCommit(); final TransactionTester tester = getTester(); final ModifyTransactionRequest req = tester.expectTransactionRequest(ModifyTransactionRequest.class); - assertTrue(req.getPersistenceProtocol().isPresent()); - assertEquals(PersistenceProtocol.SIMPLE, req.getPersistenceProtocol().get()); + assertEquals(Optional.of(PersistenceProtocol.SIMPLE), req.getPersistenceProtocol()); tester.replySuccess(new TransactionCommitSuccess(TRANSACTION_ID, req.getSequence())); assertFutureEquals(true, result); } @@ -181,8 +179,7 @@ public class RemoteProxyTransactionTest extends AbstractProxyTransactionTest