RecoveryContext implements RevisionContext { RecoveryContext(NodeDocument root, Clock clock, int clusterId, CommitValueResolver resolver) { this.root = root; this.clock = clock; this.clusterId = clusterId; this.resolver = resolver; } RecoveryContext(NodeDocument root,
                    Clock clock,
                    int clusterId,
                    CommitValueResolver resolver); @Override UnmergedBranches getBranches(); @Override UnsavedModifications getPendingModifications(); @Override int getClusterId(); @NotNull @Override RevisionVector getHeadRevision(); @NotNull @Override Revision newRevision(); @NotNull @Override Clock getClock(); @Nullable @Override String getCommitValue(@NotNull Revision changeRevision,
                                 @NotNull NodeDocument doc);  }
@Test public void recoveryContext() { DocumentStore store = new MemoryDocumentStore(); NodeDocument doc = new NodeDocument(store); int clusterId = 1; RevisionContext context = new RecoveryContext(doc, Clock.SIMPLE, clusterId, (r, d) -> null); assertEquals(clusterId, context.getClusterId()); assertEquals(0, context.getBranches().size()); assertThat(context.getPendingModifications().getPaths(), empty()); assertEquals(clusterId, context.newRevision().getClusterId()); }