@Override
  public HttpResponse send(HttpRequest httpRequest) throws IOException {
    return send(httpRequest, null);
  }
@Test
  public void send_whenInvalidCertificatesAreIgnored_getResponseWithoutException()
      throws GeneralSecurityException, IOException {
    InetAddress loopbackAddress = InetAddress.getLoopbackAddress();
    String host = "host.com";
    MockWebServer mockWebServer = startMockWebServerWithSsl(loopbackAddress);
    int port = mockWebServer.url("/").port();
    NetworkService networkService =
        NetworkService.newBuilder()
            .setNetworkEndpoint(
                NetworkEndpointUtils.forIpHostnameAndPort(
                    loopbackAddress.getHostAddress(), host, port))
            .build();

    HttpClientCliOptions cliOptions = new HttpClientCliOptions();
    HttpClientConfigProperties configProperties = new HttpClientConfigProperties();
    cliOptions.trustAllCertificates = configProperties.trustAllCertificates = true;
    HttpClient httpClient =
        Guice.createInjector(
                new AbstractModule() {
                  @Override
                  protected void configure() {
                    install(new HttpClientModule.Builder().build());
                    bind(HttpClientCliOptions.class).toInstance(cliOptions);
                    bind(HttpClientConfigProperties.class).toInstance(configProperties);
                  }
                })
            .getInstance(HttpClient.class);

    HttpResponse response =
        httpClient.send(
            get(String.format("https://%s:%d", host, port)).withEmptyHeaders().build(),
            networkService);
    assertThat(response.bodyString()).hasValue("body");

    mockWebServer.shutdown();
  }