private HttpClient createHttpClient(String nonProxyHosts) {
        HttpClientFactory<ConnectionManagerAwareHttpClient> httpClientFactory = new ApacheHttpClientFactory();
        ClientConfiguration config = new ClientConfiguration()
                .withProxyHost("localhost").withProxyPort(server.getPort())
                .withNonProxyHosts(nonProxyHosts);
        return httpClientFactory.create(HttpClientSettings.adapt(config));
    }
This class starts a mock proxy server, and once a request is sent to this mock proxy server,
a 200 OK will be returned. We'll take advantage of this returned status code to test whether
a request to the given fake service host is passed through the proxy or not.
aws-java-sdk-core/src/test/java/com/amazonaws/internal/SdkProxyRoutePlannerIntegrationTest.java