Code example for CollectionCertStoreParameters

Methods: clone

0
     */ 
    public final void testClone01() { 
        Vector certificates = new Vector();
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)4}));
        CollectionCertStoreParameters cp1 =
            new CollectionCertStoreParameters(certificates);
        CollectionCertStoreParameters cp2 =
            (CollectionCertStoreParameters)cp1.clone();
        // check that that we have new object 
        assertTrue(cp1 != cp2);
    } 
 
    /** 
     * Test #2 for <code>clone()</code> method<br> 
     * Assertion: ...only a reference to the <code>Collection</code> 
     * is copied, and not the contents 
     */ 
    public final void testClone02() { 
        Vector certificates = new Vector();
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)4}));