Issue #229: add tests for optimization problem