DataClientClassicApi implements DataClientWrapper { @Override public BulkReadWrapper createBulkRead(String tableId) { BigtableTableName tableName = new BigtableTableName( NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId)); return new BulkReadClassicApi(session.createBulkRead(tableName), tableId); } DataClientClassicApi(BigtableSession session, RequestContext requestContext); @Override BulkMutationWrapper createBulkMutation(String tableId); @Override BulkReadWrapper createBulkRead(String tableId); @Override ApiFuture<Void> mutateRowAsync(RowMutation rowMutation); @Override ApiFuture<Result> readModifyWriteRowAsync(ReadModifyWriteRow readModifyWriteRow); @Override ApiFuture<Boolean> checkAndMutateRowAsync(ConditionalRowMutation conditionalRowMutation); @Override ApiFuture<List<KeyOffset>> sampleRowKeysAsync(String tableId); @Override ApiFuture<Result> readRowAsync(String tableId, ByteString rowKey, Filters.Filter filter); @Override org.apache.hadoop.hbase.client.ResultScanner readRows(Query request); @Override ApiFuture<List<Result>> readRowsAsync(Query request); @Override void readRowsAsync(Query request, final StreamObserver<Result> observer); @Override void close();  }
@Test public void testCreateBulkRead() { BulkRead mockBulkRead = Mockito.mock(BulkRead.class); when(bigtableSession.createBulkRead(Mockito.<BigtableTableName>any())).thenReturn(mockBulkRead); assertTrue(dataClientWrapper.createBulkRead(TABLE_ID) instanceof BulkReadClassicApi); verify(bigtableSession).createBulkRead(Mockito.<BigtableTableName>any()); }