@Test
  public void testPutAsyncStringValue() throws Exception {
    String key = "key";
    String value = "value";
    Bucket bucket = mock(Bucket.class);
    AsyncBucket asyncBucket = mock(AsyncBucket.class);
    CouchbaseTableWriteFunction<String> writeFunction =
        createAndInit(String.class, new StringSerde(), bucket, asyncBucket);
    when(asyncBucket.upsert(any(Document.class), anyLong(), any(TimeUnit.class))).thenReturn(Observable.just(null));
    assertNull(writeFunction.putAsync(key, value).get());
  }
This class performs unit tests for CouchbaseTableWriteFunction.
samza-kv-couchbase/src/test/java/org/apache/samza/table/remote/couchbase/TestCouchbaseTableWriteFunction.java