Add basic tests for HierarchyTree.
Add tests for casting in Python (get_from()).