AdminClientClassicApi implements AdminClientWrapper { @Override public ApiFuture<Void> dropRowRangeAsync(String tableId, ByteString rowKeyPrefix) { Preconditions.checkNotNull(rowKeyPrefix); DropRowRangeRequest protoRequest = DropRowRangeRequest.newBuilder() .setName(instanceName.toTableNameStr(tableId)) .setDeleteAllDataFromTable(false) .setRowKeyPrefix(rowKeyPrefix) .build(); return ApiFutureUtil.transformAndAdapt( delegate.dropRowRangeAsync(protoRequest), new Function<Empty, Void>() { @Override public Void apply(Empty empty) { return null; } }); } AdminClientClassicApi(
      @Nonnull BigtableTableAdminClient delegate, @Nonnull BigtableInstanceName instanceName); @Override ApiFuture<Table> createTableAsync(CreateTableRequest request); @Override ApiFuture<Table> getTableAsync(String tableId); @Override ApiFuture<List<String>> listTablesAsync(); @Override ApiFuture<Void> deleteTableAsync(String tableId); @Override ApiFuture<Table> modifyFamiliesAsync(ModifyColumnFamiliesRequest request); @Override ApiFuture<Void> dropRowRangeAsync(String tableId, ByteString rowKeyPrefix); @Override ApiFuture<Void> dropAllRowsAsync(String tableId); @Override void close();  }
@Test public void dropRowRangeAsyncForDeleteByPrefix() throws ExecutionException, InterruptedException { ByteString rowKey = ByteString.copyFrom(new byte[] {0, -32, 122, 13}); DropRowRangeRequest request = DropRowRangeRequest.newBuilder() .setName(TABLE_NAME) .setDeleteAllDataFromTable(false) .setRowKeyPrefix(rowKey) .build(); when(delegate.dropRowRangeAsync(request)) .thenReturn(immediateFuture(Empty.newBuilder().build())); adminClientWrapper.dropRowRangeAsync(TABLE_ID, rowKey).get(); verify(delegate).dropRowRangeAsync(request); }