@Test
  public void testGetAsyncStringValue() throws Exception {
    String key = "key";
    String value = "value";
    StringSerde stringSerde = new StringSerde();
    Bucket bucket = mock(Bucket.class);
    AsyncBucket asyncBucket = mock(AsyncBucket.class);
    CouchbaseTableReadFunction readFunction = createAndInit(String.class, stringSerde, bucket, asyncBucket);
    when(asyncBucket.get(eq(key), anyObject(), anyLong(), any(TimeUnit.class))).thenReturn(
        Observable.just(BinaryDocument.create(key, Unpooled.wrappedBuffer(stringSerde.toBytes(value)))));
    assertEquals(value, readFunction.getAsync(key).get());
  }
This class performs unit tests for CouchbaseTableReadFunction.
samza-kv-couchbase/src/test/java/org/apache/samza/table/remote/couchbase/TestCouchbaseTableReadFunction.java