public TraceNode addChild(TraceNode child) {
        if (note != null) {
            throw new IllegalStateException("Nodes with notes are leaf nodes, you can not add children to it.");
        }
        TraceNode node = new TraceNode(child);
        node.parent = this;
        children.add(node);
        return this;
    }
Adds a child node to this.

@param child The child to add.
@return This, to allow chaining.
messagebus/src/main/java/com/yahoo/messagebus/TraceNode.java