AbstractRebaseDiff implements NodeStateDiff { protected abstract void deleteDeletedProperty(NodeBuilder builder, PropertyState before); protected  AbstractRebaseDiff(NodeBuilder builder); @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 deleteDeletedProperty() { NodeBuilder headBuilder = base.builder(); headBuilder.removeProperty("x"); NodeState head = headBuilder.getNodeState(); NodeBuilder branchBuilder = base.builder(); branchBuilder.removeProperty("x"); NodeState branch = branchBuilder.getNodeState(); RebaseDiff rebaseDiff = new RebaseDiff(head.builder()) { @Override protected void deleteDeletedProperty(NodeBuilder builder, PropertyState before) { assertEquals(createProperty("x", 1), before); resolve(); } }; branch.compareAgainstBaseState(base, rebaseDiff); assertTrue(rebaseDiff.isResolved()); }