Convert DatastoreSnapshotRestore to OSGi DS
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / databroker / ClientBackedReadTransactionTest.java
index 2d09073228b6636ef511e3c56670f098bafe735f..5bb61b0aef859644f3d9eac5ec5bf2dcb066f463 100644 (file)
@@ -10,8 +10,9 @@ package org.opendaylight.controller.cluster.databroker;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.doReturn;
+import static org.opendaylight.yangtools.util.concurrent.FluentFutures.immediateFluentFuture;
+import static org.opendaylight.yangtools.util.concurrent.FluentFutures.immediateTrueFluentFuture;
 
-import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.util.Optional;
 import org.junit.Before;
@@ -45,15 +46,15 @@ public class ClientBackedReadTransactionTest extends ClientBackedTransactionTest
         doReturn(CLIENT_ID).when(clientContext).getIdentifier();
         doReturn(TRANSACTION_ID).when(delegate).getIdentifier();
 
-        doReturn(Futures.immediateCheckedFuture(Boolean.TRUE)).when(delegate).exists(YangInstanceIdentifier.EMPTY);
-        doReturn(Futures.immediateCheckedFuture(Optional.of(data))).when(delegate).read(YangInstanceIdentifier.EMPTY);
+        doReturn(immediateTrueFluentFuture()).when(delegate).exists(YangInstanceIdentifier.empty());
+        doReturn(immediateFluentFuture(Optional.of(data))).when(delegate).read(YangInstanceIdentifier.empty());
 
         object = new ClientBackedReadTransaction(delegate, null, null);
     }
 
     @Test
     public void testRead() throws Exception {
-        final ListenableFuture<Optional<NormalizedNode<?, ?>>> result = object().read(YangInstanceIdentifier.EMPTY);
+        final ListenableFuture<Optional<NormalizedNode<?, ?>>> result = object().read(YangInstanceIdentifier.empty());
         final Optional<NormalizedNode<?, ?>> resultData = result.get();
         assertTrue(resultData.isPresent());
         assertEquals(data, resultData.get());
@@ -61,7 +62,7 @@ public class ClientBackedReadTransactionTest extends ClientBackedTransactionTest
 
     @Test
     public void testExists() throws Exception {
-        final ListenableFuture<Boolean> result = object().exists(YangInstanceIdentifier.EMPTY);
+        final ListenableFuture<Boolean> result = object().exists(YangInstanceIdentifier.empty());
         assertEquals(Boolean.TRUE, result.get());
     }
 }