### Question:
TreeDifference { public Map<NodeRef, NodeRef> findPureMetadataChanges() { SortedMap<String, MutableTree> leftEntries = leftTree.getChildrenAsMap(); SortedMap<String, MutableTree> rightEntries = rightTree.getChildrenAsMap(); Map<NodeRef, NodeRef> matches = Maps.newTreeMap(); for (Map.Entry<String, MutableTree> e : leftEntries.entrySet()) { final String nodePath = e.getKey(); final MutableTree leftTree = e.getValue(); final Node leftNode = leftTree.getNode(); @Nullable final MutableTree rightTree = rightEntries.get(nodePath); final Node rightNode = rightTree == null ? null : rightTree.getNode(); if (leftNode.equals(rightNode)) { final Optional<ObjectId> leftMetadata = leftNode.getMetadataId(); final Optional<ObjectId> rightMetadata = rightNode.getMetadataId(); if (!leftMetadata.equals(rightMetadata)) { String parentPath = NodeRef.parentPath(nodePath); NodeRef leftRef = new NodeRef(leftNode, parentPath, ObjectId.NULL); NodeRef rightRef = new NodeRef(rightNode, parentPath, ObjectId.NULL); matches.put(leftRef, rightRef); } } } return matches; } TreeDifference(MutableTree leftTree, MutableTree rightTree); static TreeDifference create(MutableTree leftTree, MutableTree rightTree); MutableTree getLeftTree(); MutableTree getRightTree(); TreeDifference inverse(); SortedMap<NodeRef, NodeRef> findRenames(); SortedSet<NodeRef> findNewTrees(); SortedSet<NodeRef> findDeletes(); SortedMap<NodeRef, NodeRef> findChanges(); Map<NodeRef, NodeRef> findPureMetadataChanges(); boolean areEqual();  }### Answer:
@Test public void testFindPureMetadataChanges() { Map<NodeRef, NodeRef> metadataChanges = treeDifference.findPureMetadataChanges(); assertNotNull(metadataChanges); assertEquals(1, metadataChanges.size()); NodeRef left = tree("buildings/stores", "a5", "d3"); NodeRef right = tree("buildings/stores", "a5", "d31"); assertEquals(right, metadataChanges.get(left)); }