import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.doReturn;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.doReturn;
doReturn(CLIENT_ID).when(clientContext).getIdentifier();
doReturn(TRANSACTION_ID).when(delegate).getIdentifier();
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 {
object = new ClientBackedReadTransaction(delegate, null, null);
}
@Test
public void testRead() throws Exception {
final Optional<NormalizedNode<?, ?>> resultData = result.get();
assertTrue(resultData.isPresent());
assertEquals(data, resultData.get());
final Optional<NormalizedNode<?, ?>> resultData = result.get();
assertTrue(resultData.isPresent());
assertEquals(data, resultData.get());