Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
RawIndexQuery biq =
new RawIndexQuery.Builder(ns, "test_index", Type._BIN, indexKey).withKeyAndIndex(true).build();
RawIndexQuery.Response iResp = client.execute(biq);
assertTrue(iResp.hasEntries());
RawIndexQuery.Response.Entry first = iResp.getEntries().iterator().next();
assertEquals(ip.key, first.getRiakObjectLocation().getKey().toString());
assertArrayEquals(ip.indexKey, first.getIndexKey().getValue());