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%2Fdatabroker%2Factors%2Fdds%2FLocalReadOnlyProxyTransactionTest.java;h=5f334399687076e137bfc361d40bab0f8e7a5884;hp=ba38cfe11d8f03170d5e2851af04c39de534c15e;hb=e84f63ee098fff5b02cbce1281ca0d1208f966fa;hpb=2d60632f7cf63712e8357a3cf3fc40d83366e5e6 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadOnlyProxyTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadOnlyProxyTransactionTest.java index ba38cfe11d..5f33439968 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadOnlyProxyTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadOnlyProxyTransactionTest.java @@ -13,16 +13,16 @@ import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtil import akka.testkit.TestProbe; import com.google.common.base.Ticker; import com.google.common.base.VerifyException; +import java.util.Optional; import org.junit.Assert; import org.junit.Test; import org.opendaylight.controller.cluster.access.commands.AbortLocalTransactionRequest; import org.opendaylight.controller.cluster.access.commands.ModifyTransactionRequest; import org.opendaylight.controller.cluster.access.commands.ModifyTransactionRequestBuilder; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot; +import org.opendaylight.yangtools.yang.data.tree.api.DataTreeSnapshot; public class LocalReadOnlyProxyTransactionTest extends LocalProxyTransactionTest { - private DataTreeSnapshot snapshot; @Override @@ -30,8 +30,8 @@ public class LocalReadOnlyProxyTransactionTest extends LocalProxyTransactionTest protected LocalReadOnlyProxyTransaction createTransaction(final ProxyHistory parent, final TransactionIdentifier id, final DataTreeSnapshot snapshot) { - when(snapshot.readNode(PATH_1)).thenReturn(com.google.common.base.Optional.of(DATA_1)); - when(snapshot.readNode(PATH_3)).thenReturn(com.google.common.base.Optional.absent()); + when(snapshot.readNode(PATH_1)).thenReturn(Optional.of(DATA_1)); + when(snapshot.readNode(PATH_3)).thenReturn(Optional.empty()); this.snapshot = snapshot; return new LocalReadOnlyProxyTransaction(parent, id, this.snapshot); } @@ -48,25 +48,25 @@ public class LocalReadOnlyProxyTransactionTest extends LocalProxyTransactionTest @Override @Test(expected = UnsupportedOperationException.class) - public void testDirectCommit() throws Exception { + public void testDirectCommit() { transaction.directCommit(); } @Override @Test(expected = UnsupportedOperationException.class) - public void testCanCommit() throws Exception { + public void testCanCommit() { transaction.canCommit(new VotingFuture<>(new Object(), 1)); } @Override @Test(expected = UnsupportedOperationException.class) - public void testPreCommit() throws Exception { + public void testPreCommit() { transaction.preCommit(new VotingFuture<>(new Object(), 1)); } @Override @Test(expected = UnsupportedOperationException.class) - public void testDoCommit() throws Exception { + public void testDoCommit() { transaction.doCommit(new VotingFuture<>(new Object(), 1)); } @@ -109,7 +109,7 @@ public class LocalReadOnlyProxyTransactionTest extends LocalProxyTransactionTest } @Test - public void testApplyModifyTransactionRequest() throws Exception { + public void testApplyModifyTransactionRequest() { final TestProbe probe = createProbe(); final ModifyTransactionRequestBuilder builder = new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref());