public void addCookie(JDiscCookieWrapper cookie) {
        if (cookie != null) {
            List<Cookie> cookies = new ArrayList<>();
            // Get current set of cookies first
            List<Cookie> c = getCookies();
            if (c != null && !c.isEmpty()) {
                cookies.addAll(c);
            }
            cookies.add(cookie.getCookie());
            setCookies(cookies);
        }
    }
@Test
    void testAddCookie() {
        URI uri = URI.create("http://example.yahoo.com/test");
        HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
        DiscFilterRequest request = new DiscFilterRequest(httpReq);
        request.addCookie(JDiscCookieWrapper.wrap(new Cookie("name", "value")));

        List<Cookie> cookies = request.getCookies();
        assertEquals(cookies.size(), 1);
        assertEquals(cookies.get(0).getName(), "name");
        assertEquals(cookies.get(0).getValue(), "value");
    }