public function redefineUsingExpectation(Expectation $expectation)
    {
        $fqn = $this->function_name->fullyQualifiedName();

        $this->alias(function (...$args) use ($expectation, $fqn) {

            $mock = $expectation->mockeryExpectation()->getMock();
            $target = new ExpectationTarget(ExpectationTarget::TYPE_FUNCTION, $fqn);

            return $mock->{$target->mockMethodName()}(...$args);
        });
    }