private function validateUrl(string $url)
    {
        if (!(new UrlSpecification)->isSatisfiedBy(new Url($url))) {
            throw new UrlException(sprintf(
                'The string "%s" is not a valid url',
                $url
            ));
        }
    }