@Test public void addNodeTwice() { RevisionVector baseRev = ns.getHeadRevision(); Path foo = Path.fromString("/foo"); CommitBuilder builder = new CommitBuilder(ns, baseRev); builder.addNode(foo); try { builder.addNode(foo); fail("Must fail with DocumentStoreException"); } catch (DocumentStoreException e) { assertThat(e.getMessage(), containsString("already added")); } }
@NotNull CommitBuilder addNode(@NotNull Path path) { addNode(new DocumentNodeState(nodeStore, path, new RevisionVector(revision))); return this; }
CommitBuilder { @NotNull CommitBuilder addNode(@NotNull Path path) { addNode(new DocumentNodeState(nodeStore, path, new RevisionVector(revision))); return this; } }
CommitBuilder { @NotNull CommitBuilder addNode(@NotNull Path path) { addNode(new DocumentNodeState(nodeStore, path, new RevisionVector(revision))); return this; } CommitBuilder(@NotNull DocumentNodeStore nodeStore,
                  @Nullable RevisionVector baseRevision);   CommitBuilder(@NotNull DocumentNodeStore nodeStore,
                  @NotNull Revision revision,
                  @Nullable RevisionVector baseRevision); }
CommitBuilder { @NotNull CommitBuilder addNode(@NotNull Path path) { addNode(new DocumentNodeState(nodeStore, path, new RevisionVector(revision))); return this; } CommitBuilder(@NotNull DocumentNodeStore nodeStore,
                  @Nullable RevisionVector baseRevision);   CommitBuilder(@NotNull DocumentNodeStore nodeStore,
                  @NotNull Revision revision,
                  @Nullable RevisionVector baseRevision);  }
CommitBuilder { @NotNull CommitBuilder addNode(@NotNull Path path) { addNode(new DocumentNodeState(nodeStore, path, new RevisionVector(revision))); return this; } CommitBuilder(@NotNull DocumentNodeStore nodeStore,
                  @Nullable RevisionVector baseRevision);   CommitBuilder(@NotNull DocumentNodeStore nodeStore,
                  @NotNull Revision revision,
                  @Nullable RevisionVector baseRevision);   }