Source:
public void test_doOutput ( ) throws java.lang.Throwable { org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.setUpStoreProperties ( ) ; javax.net.ssl.SSLServerSocket ss = ( ( javax.net.ssl.SSLServerSocket ) ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.getContext ( ) . getServerSocketFactory ( ) . createServerSocket ( 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://localhost:" + ( ss.getLocalPort ( ) ) ) ) ; javax.net.ssl.HttpsURLConnection connection = ( ( javax.net.ssl.HttpsURLConnection ) ( url.openConnection ( ) ) ) ; connection.setSSLSocketFactory ( org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.getContext ( ) . getSocketFactory ( ) ) ; connection.setDoOutput ( true ) ; 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 testConsequentProxyConnection ( ) throws java.lang.Throwable { org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.setUpStoreProperties ( ) ; 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.SingleRequestDispatcher getDispatcher1 = 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 ) ; com.google.mockwebserver.MockWebServer proxyAndWebServer1 = org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.createProxiedServer ( getDispatcher1 ) ; java.net.URL proxyUrl1 = proxyAndWebServer1.getUrl ( "/" ) ; java.net.URL url = new java.net.URL ( "https://requested.host:55555/requested.data" ) ; java.net.InetSocketAddress proxyAddress = new java.net.InetSocketAddress ( "localhost" , proxyUrl1.getPort ( ) ) ; 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 , getDispatcher1.getLastRequest ( ) ) ; proxyAndWebServer1.shutdown ( ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.SingleRequestDispatcher getDispatcher2 = 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 ) ; com.google.mockwebserver.MockWebServer proxyAndWebServer2 = org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.createProxiedServer ( getDispatcher2 ) ; java.net.URL proxyUrl2 = proxyAndWebServer2.getUrl ( "/" ) ; java.net.InetSocketAddress proxyAddress2 = new java.net.InetSocketAddress ( "localhost" , proxyUrl2.getPort ( ) ) ; javax.net.ssl.HttpsURLConnection connection2 = ( ( javax.net.ssl.HttpsURLConnection ) ( url.openConnection ( new java.net.Proxy ( java.net.Proxy.Type.HTTP , proxyAddress2 ) ) ) ) ; connection2.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 ( connection2 , false ) ; org.apache.harmony.luni.tests.internal.net.www.protocol.https.HttpsURLConnectionTest.checkConnectionStateParameters ( connection2 , getDispatcher2.getLastRequest ( ) ) ; proxyAndWebServer2.shutdown ( ) ; }