Code example for SSLParameters

Methods: getProtocols, setProtocols

0
        // confirm clone on output 
        assertNotSame(p.getCipherSuites(), p.getCipherSuites());
    } 
 
    public void test_SSLParameters_Protocols() { 
        SSLParameters p = new SSLParameters();
        assertNull(p.getProtocols());
 
        // confirm clone on input 
        String[] protocols = new String[] { "fnord" };
        String[] copy = protocols.clone();
        p.setProtocols(copy);
        copy[0] = null;
        assertEquals(Arrays.asList(protocols), Arrays.asList(p.getProtocols()));
 
        // confirm clone on output 
        assertNotSame(p.getProtocols(), p.getProtocols());
    } 
 
    public void test_SSLParameters_ClientAuth() { 
        SSLParameters p = new SSLParameters();
        assertFalse(p.getWantClientAuth());