NodeDocument.setRevision(op, r51, "c");
NodeDocument.setPrevious(op, r42, r12);
NodeDocument.setPrevious(op, r31, r01);
store.createOrUpdate(NODES, op);
NodeDocument doc = store.find(NODES, rootId);
assertNotNull(doc);
List<NodeDocument> prevDocs = Lists.newArrayList(
doc.getPreviousDocs("p1", null));
assertEquals(2, prevDocs.size());
assertEquals(Utils.getPreviousIdFor(rootId, r31), prevDocs.get(0).getId());