public function register(FunctionProphecy $prophecy)
    {
        $name = $prophecy->getFQName();

        if ($this->has($name)) {
            throw new \Exception();
        }

        if (! function_exists($name)) {
            Generator::generate($prophecy);
        }

        $this->mocks[$name] = $prophecy->getNamespace();

        return $this;
    }