public function getEndpointAsUrl($port, $protocol = 'tcp')
    {
        if (!$this->hasEndpoint($port, $protocol)) {
            throw new Exception('Endpoint is not available');
        }

        $key = $port . '/' . $protocol;

        return Url::fromString($this->endpoints[$key]);
    }