public Response get(URL url, Request request) throws IOException {
    return call(HttpMethods.GET, url, request);
  }
@Test
  public void testGet_insecureClientOnHttpServerAndNoPortSpecified() throws IOException {
    FailoverHttpClient insecureHttpClient = newHttpClient(true, false);

    Mockito.when(mockHttpRequest.execute())
        .thenThrow(new ConnectException()) // server is not listening on 443
        .thenReturn(mockHttpResponse); // respond when connected through 80

    try (Response response =
        insecureHttpClient.get(new URL("https://insecure"), fakeRequest(null))) {
      byte[] bytes = new byte[4];
      Assert.assertEquals(4, response.getBody().read(bytes));
      Assert.assertEquals("body", new String(bytes, StandardCharsets.UTF_8));
    }

    Mockito.verify(mockHttpRequest, Mockito.times(2)).execute();
    Mockito.verifyNoInteractions(mockInsecureHttpRequest);

    verifyCapturedUrls("https://insecure", "http://insecure");
    verifyWarnings("Failed to connect to https://insecure over HTTPS. Attempting again with HTTP.");
  }