Code example for PKIXParameters

Methods: getCertStoressetCertStores

        Set taSet = TestUtils.getTrustAnchorSet();
        if (taSet == null) {
            fail(getName() + ": not performed (could not create test TrustAnchor set)");
        PKIXParameters p = new PKIXParameters(taSet);
        // add null 
        // check that we have non null empty list now 
        assertNotNull("notNull1", p.getCertStores());
        assertTrue("isEmpty1", p.getCertStores().isEmpty());
        // add empty 
        p.setCertStores(new ArrayList());
        assertNotNull("notNull2", p.getCertStores());
        assertTrue("isEmpty2", p.getCertStores().isEmpty());
     * Test #3 for <code>setCertStores(List)</code> method<br> 
     * Assertion: list is copied to protect against subsequent modifications 
Contextual code suggestions in your IDE  Get Codota for Java