void fetchUpdateCheckHeaders(DownloadableFile downloadableFile) throws IOException, GeneralSecurityException {
        String url = downloadableFile.validatedUrl(urlGenerator);
        final HttpRequestBase request = new HttpHead(url);
        request.setConfig(RequestConfig.custom().setConnectTimeout(HTTP_TIMEOUT_IN_MILLISECONDS).build());

        try (
            CloseableHttpClient httpClient = httpClientBuilder.build();
            CloseableHttpResponse response = httpClient.execute(request)
        ) {
            handleInvalidResponse(response, url);
            this.md5 = response.getFirstHeader(MD5_HEADER).getValue();
            this.extraProperties = HeaderUtil.parseExtraProperties(response.getFirstHeader(AGENT_EXTRA_PROPERTIES_HEADER));
        }
    }
@Test
    public void shouldFailIfServerIsNotAvailable() {
        ServerBinaryDownloader downloader = new ServerBinaryDownloader(new GoAgentServerHttpClientBuilder(null, SslVerificationMode.NONE, null, null, null), ServerUrlGeneratorMother.generatorWithoutSubPathFor("https://invalidserver:" + server.getSecurePort() + "/go"));
        assertThatThrownBy(() -> downloader.fetchUpdateCheckHeaders(DownloadableFile.AGENT))
                .isExactlyInstanceOf(UnknownHostException.class)
                .hasMessageContaining("invalidserver");
    }