Code example for CollectionCertStoreParameters

Methods: getCollection

0
     */ 
    public final void testCollectionCertStoreParametersCollection03() { 
        Vector certificates = new Vector();
        // create using empty collection 
        CollectionCertStoreParameters cp =
            new CollectionCertStoreParameters(certificates);
        // check that the reference is used  
        assertTrue("isRefUsed_1", certificates == cp.getCollection());
        // check that collection still empty 
        assertTrue("isEmpty", cp.getCollection().isEmpty());
        // modify our collection 
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)1}));
        certificates.add(new MyCertificate("TEST", new byte[] {(byte)2}));
        // check that internal state has been changed accordingly 
        assertTrue("isRefUsed_2", certificates.equals(cp.getCollection()));
    } 
 
    /** 
     * Test #4 for <code>CollectionCertStoreParameters(Collection)</code> 
     * constructor<br> 
     * Assertion: <code>NullPointerException</code> - if