use of com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation in project java-bigtable by googleapis.
the class BigtableDataClientTests method checkAndMutateRowTest.
@Test
public void checkAndMutateRowTest() {
Mockito.when(mockStub.checkAndMutateRowCallable()).thenReturn(mockCheckAndMutateRowCallable);
Mockito.when(mockCheckAndMutateRowCallable.futureCall(ArgumentMatchers.any(ConditionalRowMutation.class))).thenReturn(ApiFutures.immediateFuture(Boolean.TRUE));
ConditionalRowMutation mutation = ConditionalRowMutation.create("fake-table", "fake-key").then(Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value"));
bigtableDataClient.checkAndMutateRow(mutation);
Mockito.verify(mockCheckAndMutateRowCallable).futureCall(mutation);
}
use of com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation in project java-bigtable by googleapis.
the class BigtableDataClientTest method proxyCheckAndMutateRowTest.
@Test
public void proxyCheckAndMutateRowTest() {
Mockito.when(mockStub.checkAndMutateRowCallable()).thenReturn(mockCheckAndMutateRowCallable);
ConditionalRowMutation mutation = ConditionalRowMutation.create("fake-table", "fake-key").then(Mutation.create().setCell("fake-family", "fake-qualifier", "fake-value"));
bigtableDataClient.checkAndMutateRowAsync(mutation);
Mockito.verify(mockCheckAndMutateRowCallable).futureCall(mutation);
}
Aggregations