CommitBuilder { @NotNull Commit build() { if (PSEUDO_COMMIT_REVISION.equals(revision)) { String msg = "Cannot build a commit with a pseudo commit revision"; throw new IllegalStateException(msg); } return new Commit(nodeStore, revision, baseRevision, startRevisions, operations, addedNodes, removedNodes, nodesWithBinaries, bundledNodes); } CommitBuilder(@NotNull DocumentNodeStore nodeStore,
                  @Nullable RevisionVector baseRevision);   CommitBuilder(@NotNull DocumentNodeStore nodeStore,
                  @NotNull Revision revision,
                  @Nullable RevisionVector baseRevision);   }
@Test public void buildWithNullRevision() { CommitBuilder builder = new CommitBuilder(ns, null); try { builder.build(null); expectNPE(); } catch (NullPointerException e) { } }
@Test public void defaultStartRevisions() { RevisionVector head = ns.getHeadRevision(); CommitBuilder builder = new CommitBuilder(ns, head); Commit c = builder.build(ns.newRevision()); assertEquals(new RevisionVector(), c.getStartRevisions()); }