visitor test should actually compare output with tree