Add a functional test for complex operation trees