@Test
public void updateAnnotatedPojo() throws ExecutionException, InterruptedException
{
RiakClient client = new RiakClient(cluster);
Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
Location loc = new Location(ns, "test_update_key2");
UpdateValue uv = new UpdateValue.Builder(loc)
.withStoreOption(Option.RETURN_BODY, true)
.withUpdate(new UpdateAnnotatedPojo())
.build();
UpdateValue.Response resp = client.execute(uv);
RiakAnnotatedPojo rap = resp.getValue(RiakAnnotatedPojo.class);
assertNotNull(rap.bucketName);
assertEquals(ns.getBucketNameAsString(), rap.bucketName);
assertNotNull(rap.key);
assertEquals(loc.getKeyAsString(), rap.key);
assertNotNull(rap.bucketType);
assertEquals(ns.getBucketTypeAsString(), rap.bucketType);
assertNotNull(rap.contentType);
assertEquals("application/json", rap.contentType);
assertNotNull(rap.vclock);
assertNotNull(rap.vtag);
assertNotNull(rap.lastModified);