@Test
public void testStoreFetchDelete() throws ExecutionException, InterruptedException
{
RiakObject o = RiakObject.create(bucket.unsafeGetValue()).setValue("test value");
StoreMeta storeMeta = new StoreMeta.Builder().returnBody(true).build();
StoreOperation<RiakObject> store =
new StoreOperation<RiakObject>(bucket, o)
.withConverter(domainObjectConverter)
.withStoreMeta(storeMeta);
cluster.execute(store);
RiakObject storeReturn = store.get();
BinaryValue returnedKey = BinaryValue.create(storeReturn.getBucketAsBytes());
FetchOperation<RiakObject> fetch =
new FetchOperation<RiakObject>(bucket, returnedKey)
.withConverter(domainObjectConverter);
cluster.execute(fetch);
RiakObject fetchReturn = fetch.get();
DeleteOperation delete = new DeleteOperation(bucket, returnedKey);
cluster.execute(delete);
delete.get();
FetchOperation<RiakObject> tombstoneFetch =
new FetchOperation<RiakObject>(bucket, returnedKey)
.withConverter(domainObjectConverter);
cluster.execute(tombstoneFetch);
RiakObject tombstone = tombstoneFetch.get();
Assert.assertTrue(tombstone.isNotFound());
}