void (@NotNull String baseUrl) { GetMethod method = new GetMethod(baseUrl + "/rest/api/latest/serverInfo"); boolean accessible = false; try { accessible = myRepository.getHttpClient().executeMethod(method) == 200; Assume.assumeTrue("Server '" + myRepository.getUrl() + "' is inaccessible", accessible); } catch (IOException e) { ExternalResourcesChecker.reportUnavailability(baseUrl, e); } finally { if (!accessible) { try { LOG.warn( "Response from " + method.getURI() + ":\n" + method.getStatusCode() + " " + method.getStatusText() + "\n" + StringUtil.join(Arrays.asList(method.getResponseHeaders()), "") + "\n" + method.getResponseBodyAsString() ); } catch (Exception e) { LOG.warn("Failed to log response", e); } } } }