Code example for HandshakeCompletedEvent

0
     * javax.net.ssl.HandshakeCompletedEvent#HandshakeCompletedEvent(SSLSocket sock, SSLSession s) 
     */ 
    public final void test_Constructor() throws Exception { 
        mySSLSession session = new mySSLSession();
        SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket();
        HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session);
        try { 
            new HandshakeCompletedEvent(null, null);
            fail("Any exception wasn't thrown for null parameters");
        } catch (Exception expected) {
        } 
    } 
 
    /** 
     * @throws IOException 
     * javax.net.ssl.HandshakeCompletedEvent#getCipherSuite() 
     */ 
    public final void test_getCipherSuite() throws Exception { 
        mySSLSession session = new mySSLSession("localhost", 1080, null);
        SSLSocket socket = (SSLSocket) SSLSocketFactory.getDefault().createSocket();
        HandshakeCompletedEvent event = new HandshakeCompletedEvent(socket, session);