Source:
public void testProxyConnection ( ) throws java.lang.Throwable { org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.setUpStoreProperties ( ) ; java.net.ServerSocket ss = new java.net.ServerSocket ( 0 ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.TestHostnameVerifier hnv = new org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.TestHostnameVerifier ( ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( hnv ) ; java.net.URL url = new java.net.URL ( "https://requested.host:55556/requested.data" ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( url.openConnection ( new java.net.Proxy ( java.net.Proxy.Type.HTTP , new java.net.InetSocketAddress ( "localhost" , ss.getLocalPort ( ) ) ) ) ) ) ; connection.setSSLSocketFactory ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.getContext ( ) . getSocketFactory ( ) ) ; javax.net.ssl.SSLSocket peerSocket = ( ( javax.net.ssl.SSLSocket ) ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.doInteraction ( connection , ss ) ) ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.checkConnectionStateParameters ( connection , peerSocket ) ; connection.connect ( ) ; }

Target:
public void testProxyConnection ( ) throws java.lang.Throwable { org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.setUpStoreProperties ( ) ; javax.net.ssl.SSLContext ctx = org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.getContext ( ) ; javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier ( new org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.TestHostnameVerifier ( ) ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.ProxyConnectDispatcher proxyConnectDispatcher = new org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.ProxyConnectDispatcher ( false ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.SingleRequestDispatcher getDispatcher = new org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.SingleRequestDispatcher ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.GET_METHOD , org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.OK_CODE ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.DelegatingDispatcher delegatingDispatcher = new org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.DelegatingDispatcher ( proxyConnectDispatcher , getDispatcher ) ; com.google.mockwebserver.MockWebServer proxyAndWebServer = org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.createProxyAndWebServer ( ctx , delegatingDispatcher ) ; java.net.URL proxyUrl = proxyAndWebServer.getUrl ( "/" ) ; java.net.InetSocketAddress proxyAddress = new java.net.InetSocketAddress ( "localhost" , proxyUrl.getPort ( ) ) ; java.net.URL url = new java.net.URL ( "https://requested.host:55556/requested.data" ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( url.openConnection ( new java.net.Proxy ( java.net.Proxy.Type.HTTP , proxyAddress ) ) ) ) ; connection.setSSLSocketFactory ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.getContext ( ) . getSocketFactory ( ) ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.executeClientRequest ( connection , false ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.checkConnectionStateParameters ( connection , getDispatcher.getLastRequest ( ) ) ; connection.connect ( ) ; proxyAndWebServer.shutdown ( ) ; }