CommitDiff implements NodeStateDiff { int getNumChanges() { return commit.getNumOperations(); } CommitDiff(@NotNull BundlingHandler bundlingHandler,
               @NotNull CommitBuilder commitBuilder,
               @NotNull BlobSerializer blobs); private  CommitDiff(CommitBuilder commitBuilder,
                       BundlingHandler bundlingHandler,
                       JsopBuilder builder,
                       BlobSerializer blobs); @Override boolean propertyAdded(PropertyState after); @Override boolean propertyChanged(PropertyState before, PropertyState after); @Override boolean propertyDeleted(PropertyState before); @Override boolean childNodeAdded(String name, NodeState after); @Override boolean childNodeChanged(String name,
                                    NodeState before,
                                    NodeState after); @Override boolean childNodeDeleted(String name, NodeState before);  }
@Test public void removeBundledNode() throws Exception { addTestFile(); NodeBuilder after = ns.getRoot().builder(); after.child("file").child(JCR_CONTENT).remove(); CommitBuilder builder = new CommitBuilder(ns, null); CommitDiff diff = newCommitDiff(builder); after.getNodeState().compareAgainstBaseState(ns.getRoot(), diff); assertEquals(1, diff.getNumChanges()); Commit c = builder.build(Revision.newRevision(1)); Revision r = c.getRevision(); UpdateOp op = c.getUpdateOperationForNode(Path.fromString("/file")); Map<Key, Operation> changes = op.getChanges(); assertThat(changes.keySet(), hasSize(4)); assertThat(changes, hasKey(new Key(MODIFIED_IN_SECS, null))); assertThat(changes, hasKey(new Key(JCR_CONTENT + "/" + JCR_PRIMARYTYPE, r))); assertThat(changes, hasKey(new Key(JCR_CONTENT + "/" + JCR_DATA, r))); assertThat(changes, hasKey(new Key(JCR_CONTENT + "/" + META_PROP_BUNDLING_PATH, r))); }