public function addGenerator($name, GeneratorInterface $generator)
    {
        if ($this->hasGenerator($name) === true) {
            throw new \RuntimeException(sprintf('A previous generator exists with the same name: "%s".', $name));
        }

        $this->setGenerator($name, $generator);
    }