Add optimization test cases