adds test for arbitrary trees