Add tests for the Tree type