Code example for PKIXParameters

Methods: setInitialPolicies

0
        } 
 
        Set s = new HashSet();
        s.add("1.2.3.4.5.6.7");
        s.add(new Object());
        PKIXParameters p = new PKIXParameters(taSet);
        try { 
            p.setInitialPolicies(s);
            fail("ClassCastException expected");
        } catch (ClassCastException e) {
        } 
    } 
 
    /** 
     * Test #1 for <code>getTrustAnchors()</code> method<br> 
     * Assertion: an immutable <code>Set</code> of <code>TrustAnchors</code> 
     * (never <code>null</code>)  
     * @throws InvalidAlgorithmParameterException 
     */ 
    public final void testGetTrustAnchors01() throws Exception {