public static void addCookies(Map<String, List<Cookie>> cookies, BaseFetcher baseFetcher) {
        if (cookies == null) {
            throw new NullPointerException("Cookies argument is null");
        }

        Map<String, List<Cookie>> validCookies = cleanCookies(cookies);
        if (baseFetcher instanceof SimpleHttpFetcher) {
            updateCookies((SimpleHttpFetcher) baseFetcher, validCookies);
        } else if (baseFetcher instanceof OkHttpFetcher) {
            ((OkHttpFetcher) baseFetcher).updateCookies(asOkhttp3Cookies(cookies));
        }
    }
Adds cookies to the respective fetcher

@param cookies
@param baseFetcher
@throws NullPointerException if cookie is null
ache/src/main/java/achecrawler/crawler/cookies/CookieUtils.java