public boolean hasChild(final ExplorerNode parent, final ExplorerNode child) {
        if (parent != null && child != null) {
            final K parentKey = getNodeKey(parent);
            final Set<ExplorerNode> children = parentKeyToChildNodesMap.get(parentKey);

            // Can't use contains due to hash/equals including rootNodeUuid which may be
            // present on one but not the other.
            return NullSafe.set(children).stream()
                    .anyMatch(node -> Objects.equals(node.getDocRef(), child.getDocRef()));
        } else {
            return false;
        }
    }
//     * Replaces an existing node with the supplied one. The new node will
//     * be linked to the previous node's parent and children. If the key is
//     * not found an exception will be thrown. Intended for changing other properties
//     * of a node, e.g. the alerts on it.
//     *
//     * MUST be done while under an exclusive lock on this model.
//
stroom-explorer/stroom-explorer-impl/src/main/java/stroom/explorer/impl/AbstractTreeModel.java