private void setData(String pathString, byte[] content, int version, Stat stat, MemoryFileSystem.Node root, Listeners listeners)
            throws KeeperException {
        validatePath(pathString);
        Node node = getNode(pathString, null, root);
        if (version != -1 && version != node.version())
            throw new KeeperException.BadVersionException("expected version " + version + ", but was " + node.version());
        node.setContent(content);
        if (stat != null) stat.setVersion(node.version());
        listeners.notify(Path.fromString(pathString), content, PathChildrenCacheEvent.Type.CHILD_UPDATED);
    }
sets the data of an existing node
zkfacade/src/main/java/com/yahoo/vespa/curator/mock/MockCuratorFramework.java