tree unit test