byte[] expectedValue = new byte[]{'O', '_', 'o'};
Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, "bucket");
BinaryValue key = BinaryValue.create("key".getBytes());
RiakObject ro = new RiakObject();
List<RiakLink> links = new ArrayList<RiakLink>();
links.add(new RiakLink("bucket", "key", "tag"));
ro.getLinks().addLinks(links);
RiakIndexes indexes = ro.getIndexes();
LongIntIndex longIndex = indexes.getIndex(LongIntIndex.named("dave"));
longIndex.add(42L);
ro.setValue(BinaryValue.unsafeCreate(expectedValue));
Location location = new Location(ns, key);
StoreOperation operation =
new StoreOperation.Builder(location)
.withContent(ro)