TestBench test for tree (#11612)

Together with fix for tree to pass the test

Change-Id: I3d6bead220ab61b171a267d15bda2570f7351d49