Sanity unit test for hierarchical path optimizer