Tests + docs for the TreeBuilder class.