Added tests for the tree utils functions