function it_executes_promise_of_method_prophecy_that_matches_with_highest_score_to_makeCall($objectProphecy, MethodProphecy $method1, MethodProphecy $method2, MethodProphecy $method3, ArgumentsWildcard $arguments1, ArgumentsWildcard $arguments2, ArgumentsWildcard $arguments3, PromiseInterface $promise)
{
$method1->getMethodName()->willReturn('getName');
$method1->getArgumentsWildcard()->willReturn($arguments1);
$arguments1->scoreArguments(array('world', 'everything'))->willReturn(50);
$method2->getMethodName()->willReturn('getName');
$method2->getArgumentsWildcard()->willReturn($arguments2);
$method2->getPromise()->willReturn($promise);
$arguments2->scoreArguments(array('world', 'everything'))->willReturn(300);
$method3->getMethodName()->willReturn('getName');
$method3->getArgumentsWildcard()->willReturn($arguments3);
$arguments3->scoreArguments(array('world', 'everything'))->willReturn(200);
$objectProphecy->getMethodProphecies()->willReturn(array('method1' => array($method1), 'method2' => array($method2, $method3)));
$objectProphecy->getMethodProphecies('getName')->willReturn(array($method1, $method2, $method3));
$objectProphecy->reveal()->willReturn(new \stdClass());
$promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method2)->willReturn('second');
$this->makeCall($objectProphecy, 'getName', array('world', 'everything'))->shouldReturn('second');
}