public void putGraph() throws NigoriCryptographyException, IOException, UnauthorisedException {
MigoriDatastore store = getStore();
store.register();
try {
Index index = new Index("test");
RevValue a = store.put(index, "a".getBytes());
RevValue b = store.put(index, "b".getBytes(), a);
RevValue c = store.put(index, "c".getBytes(), a);
RevValue d = store.put(index, "d".getBytes(), b, c);
RevValue e = store.put(index, "e".getBytes(), c, b);
RevValue f = store.put(index, "f".getBytes(), d);
RevValue g = store.put(index, "g".getBytes(), e);
Collection<RevValue> heads = store.get(index);
assertThat(heads, hasItems(f, g));
assertTrue(store.removeIndex(index, g.getRevision()));
} finally {
store.unregister();
}
}