### Question:
UrlHttpClient implements HttpClient { void configureConnection(HttpRequest request, HttpURLConnection connection) { connection.setConnectTimeout(config.getConnectionTimeout()); connection.setReadTimeout(config.getSocketTimeout()); connection.setInstanceFollowRedirects(false); connection.setUseCaches(false); if (request.isStreaming()) { connection.setChunkedStreamingMode(0); } if (connection instanceof HttpsURLConnection) { final HttpsURLConnection https = (HttpsURLConnection) connection; if (config.getTrustManager() != null) { enableCustomTrustManager(https); } } } UrlHttpClient(ClientConfiguration config); @Override HttpResponse execute(final HttpRequest request); @Override void shutdown();  }### Answer:
@Test public void testConfigureConnection() throws MalformedURLException, URISyntaxException { final Map<String, String> headers = new HashMap<String, String>(); final HttpRequest request = new HttpRequest("POST", new URI("https: headers, null); final HttpsURLConnection conn = new MockHttpURLConnection(new URL("https: client.configureConnection(request, conn); assertEquals(conn.getConnectTimeout(), conf.getConnectionTimeout()); assertEquals(conn.getReadTimeout(), conf.getSocketTimeout()); assertSame(conn.getHostnameVerifier(), HttpsURLConnection.getDefaultHostnameVerifier()); assertFalse(conn.getInstanceFollowRedirects()); assertFalse("disable cache", conn.getUseCaches()); }
@Test public void testConfigureConnectionWithCertCheckingDisabled() throws MalformedURLException, URISyntaxException { final Map<String, String> headers = new HashMap<String, String>(); final HttpRequest request = new HttpRequest("POST", new URI("https: headers, null); final HttpsURLConnection conn = new MockHttpURLConnection(new URL("https: System.setProperty(SDKGlobalConfiguration.DISABLE_CERT_CHECKING_SYSTEM_PROPERTY, "true"); client.configureConnection(request, conn); assertEquals(conn.getConnectTimeout(), conf.getConnectionTimeout()); assertEquals(conn.getReadTimeout(), conf.getSocketTimeout()); assertFalse(conn.getInstanceFollowRedirects()); assertFalse("disable cache", conn.getUseCaches()); System.clearProperty(SDKGlobalConfiguration.DISABLE_CERT_CHECKING_SYSTEM_PROPERTY); }