public function registerService($className)
    {
        if (! class_exists($className)) {
            throw new Exception(sprintf(Exception::SERVICE_CLASS_NOT_EXISTS, $className));
        }

        $service = new $className($this);

        if (!$service instanceof Service) {
            throw new Exception(sprintf(Exception::NOT_A_SERVICE, $className));
        }
        if ($this->services->offsetExists($service->name())) {
            throw new Exception(sprintf(Exception::SERVICE_ALREADY_EXISTS, $service->name()));
        }

        $this->services->offsetSet($service->name(), $service);
    }