### Question:
FailoverHttpClient { public void shutDown() throws IOException { synchronized (transportsCreated) { while (!transportsCreated.isEmpty()) { transportsCreated.peekFirst().shutdown(); transportsCreated.removeFirst(); } } synchronized (responsesCreated) { while (!responsesCreated.isEmpty()) { responsesCreated.peekFirst().close(); responsesCreated.removeFirst(); } } } FailoverHttpClient(
      boolean enableHttpAndInsecureFailover,
      boolean sendAuthorizationOverHttp,
      Consumer<LogEvent> logger); @VisibleForTesting  FailoverHttpClient(
      boolean enableHttpAndInsecureFailover,
      boolean sendAuthorizationOverHttp,
      Consumer<LogEvent> logger,
      Supplier<HttpTransport> secureHttpTransportFactory,
      Supplier<HttpTransport> insecureHttpTransportFactory); void shutDown(); Response get(URL url, Request request); Response post(URL url, Request request); Response put(URL url, Request request); Response call(String httpMethod, URL url, Request request);  }### Answer:
@Test public void testShutDown() throws IOException { FailoverHttpClient secureHttpClient = newHttpClient(false, false); try (Response response = secureHttpClient.get(fakeUrl.toURL(), fakeRequest(null))) { secureHttpClient.shutDown(); secureHttpClient.shutDown(); Mockito.verify(mockHttpTransport, Mockito.times(1)).shutdown(); Mockito.verify(mockHttpResponse, Mockito.times(1)).disconnect(); } }