Code example for CookieManager

Methods: put

0
 
    } 
 
    private static void checkValidParams4Put(URI uri,
            Map<String, List<String>> map) throws IOException {
        CookieManager manager = new CookieManager();
        try { 
            manager.put(uri, map);
            fail("Should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // expected 
        } 
 
    } 
 
    /** 
     * @tests {@link java.net.CookieManager#get(java.net.URI, java.util.Map)} & 
     * @tests {@link java.net.CookieManager#put(java.net.URI, java.util.Map)} 
     *        IllegalArgumentException 
     * @since 1.6 
     */