public function resultFor(string $method, array $arguments, int $invocationCount)
    {
        if (!isset($this->callMap[$method])) {
            return null;
        }

        if ($this->callMap[$method] instanceof InvocationResults) {
            $result = $this->callMap[$method]->resultForInvocation($invocationCount - 1);
        } else {
            $result = $this->callMap[$method];
        }

        if (is_callable($result)) {
            return $result(...$arguments);
        }

        return $result;
    }