Adjust to yangtools-2.0.0 changes
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / databroker / actors / dds / LocalReadOnlyProxyTransactionTest.java
index c3dfebd6be3832b8d77b62692e1b14559c07d202..1fd82fbc021f2bf96130fddb0e93a96cb835d701 100644 (file)
@@ -13,6 +13,7 @@ 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;
@@ -26,11 +27,12 @@ public class LocalReadOnlyProxyTransactionTest extends LocalProxyTransactionTest
     private DataTreeSnapshot snapshot;
 
     @Override
+    @SuppressWarnings("checkstyle:hiddenField")
     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);
     }
@@ -130,4 +132,4 @@ public class LocalReadOnlyProxyTransactionTest extends LocalProxyTransactionTest
         assertOperationThrowsException(() -> transaction.replayModifyTransactionRequest(request, createCallbackMock(),
             Ticker.systemTicker().read()), VerifyException.class);
     }
-}
\ No newline at end of file
+}