public function testApisolver_InvokesProperAction_WhenRuntimeDoesExistAsThread()
{
$ex = new Exception();
$origin = 'origin';
$hash = 'hash';
$result = new StdClass();
$solver = $this->createSolver();
$manager = $this->createManager();
$manager->expects($this->once())->method('existsThread')->with($origin)->will($this->returnValue(true));
$manager->expects($this->any())->method('existsProcess')->with($origin)->will($this->returnValue(false));
$manager->expects($this->once())->method('createThread')->with($origin, null, Runtime::CREATE_FORCE, ['hash' => $hash])->will($this->returnValue($result));
$this->assertSame($result, $this->callProtectedMethod($solver, 'solver', [$ex, ['origin' => $origin, 'hash' => $hash]]));
}