Code example for PKIXBuilderParameters

Methods: getTrustAnchors

0
HashSet originalSet = (HashSet)taSet;
        HashSet originalSetCopy = (HashSet)originalSet.clone();
        // create test object using originalSet  
        PKIXBuilderParameters pp =
            new PKIXBuilderParameters(originalSetCopy, null);
        // modify originalSet 
        originalSetCopy.clear();
        // check that test object's internal state 
        // has not been affected by the above modification 
        Set returnedSet = pp.getTrustAnchors();
        assertEquals(originalSet, returnedSet);
    } 
 
    /** 
     * Test #4 for <code>PKIXBuilderParameters(Set, CertSelector)</code> 
     * constructor<br> 
     * Assertion: <code>NullPointerException</code> - 
     * if the specified <code>Set</code> is null 
     */ 
    public final void testPKIXBuilderParametersSetCertSelector04() throws Exception {