public function testApiHandle_CallsHandlerMethod()
{
$ex = new Exception('Exception');
$params = ['param1' => 'value1'];
$result = 'result';
$solver = $this->createSolver([], ['solver']);
$solver->expects($this->once())->method('solver')->with($ex, $params)->will($this->returnValue($result));
$callable = $this->createCallableMock();
$callable->expects($this->once())->method('__invoke')->with($result);
$solver->solve($ex, $params)->then($callable);
}