Added unit test for tree.hpp