String revUrl = "foo.com:http/";
String url = "http://foo.com/";
webPageStore.createSchema();
WebPage page = webPageStore.newPersistent();
Metadata metadata = new Metadata();
metadata.setVersion(1);
metadata.putToData(new Utf8("foo"), new Utf8("baz"));
page.setMetadata(metadata);
page.setUrl(new Utf8(url));
webPageStore.put(revUrl, page);
webPageStore.flush();
page = webPageStore.get(revUrl);
metadata = page.getMetadata();
Assert.assertNotNull(metadata);
Assert.assertEquals(1, metadata.getVersion());
Assert.assertEquals(new Utf8("baz"), metadata.getData().get(new Utf8("foo")));
}