unit test tree sorting