Bind solve and run optimization problem in test.