AsyncRemoteTable implements AsyncReadWriteTable<K, V> { @Override public <T> CompletableFuture<T> readAsync(int opId, Object... args) { Preconditions.checkNotNull(readFn, "null readFn"); return readFn.readAsync(opId, args); } AsyncRemoteTable(TableReadFunction<K, V> readFn, TableWriteFunction<K, V> writeFn); @Override CompletableFuture<V> getAsync(K key, Object ... args); @Override CompletableFuture<Map<K, V>> getAllAsync(List<K> keys, Object ... args); @Override CompletableFuture<T> readAsync(int opId, Object... args); @Override CompletableFuture<Void> putAsync(K key, V record, Object... args); @Override CompletableFuture<Void> putAllAsync(List<Entry<K, V>> entries, Object ... args); @Override CompletableFuture<Void> deleteAsync(K key, Object... args); @Override CompletableFuture<Void> deleteAllAsync(List<K> keys, Object ... args); @Override CompletableFuture<T> writeAsync(int opId, Object... args); @Override void init(Context context); @Override void flush(); @Override void close();  }
@Test public void testReadAsync() { int times = 0; roTable.readAsync(1, 2, 3); verify(readFn, times(++times)).readAsync(anyInt(), any(), any()); rwTable.readAsync(1, 2, 3); verify(readFn, times(++times)).readAsync(anyInt(), any(), any()); }