Code example for CookieManager

Methods: get

0
 
public class CookieManagerTest extends TestCase {
 
    private static void checkValidParams4Get(URI uri,
            Map<String, List<String>> map) throws IOException {
        CookieManager manager = new CookieManager();
        try { 
            manager.get(uri, map);
            fail("Should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // expected 
        } 
 
    } 
 
    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");