use of com.couchbase.client.java.AsyncBucket in project samza by apache.
the class TestCouchbaseTableReadFunction method testGetAsyncNonExistingKey.
@Test
public void testGetAsyncNonExistingKey() throws Exception {
String key = "NonExistingKey";
Bucket bucket = mock(Bucket.class);
AsyncBucket asyncBucket = mock(AsyncBucket.class);
CouchbaseTableReadFunction readFunction = createAndInit(String.class, new StringSerde(), bucket, asyncBucket);
when(asyncBucket.get(eq(key), anyObject(), anyLong(), any(TimeUnit.class))).thenReturn(Observable.empty());
assertNull(readFunction.getAsync(key).get());
}
Aggregations