public void addCookie(Cookie cookie) {
        if (cookie != null) {
            // first remove any old cookie that is equivalent
            cookies.remove(cookie);
            if (!cookie.isExpired(new Date())) {
                cookies.add(cookie);
            }
        }
    }
Adds an {@link Cookie HTTP cookie}, replacing any existing equivalent
cookies. If the given ookie has already expired it will not be added, but
existing values will still be removed.

@param cookie
           the {@link Cookie cookie} to be added

@see #addCookies(Cookie[])
crawler-commons/src/main/java/achecrawler/crawler/crawlercommons/fetcher/http/LocalCookieStore.java