public NodeMutex with(Node updatedNode) {
        if (!node.equals(updatedNode)) {
            throw new IllegalArgumentException("Updated node not equal to current");
        }

        return new NodeMutex(updatedNode, mutex);
    }
Returns a node mutex with the same mutex as this, but the given node.  Be sure to close only one.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeMutex.java