public static Map<String, javax.ws.rs.core.Cookie> parse(Iterable<String> cookieHeaders, int version) {
        // This has to be a mutable Map! RESTEasy will fail otherwise
        return Streams.stream(cookieHeaders)
                      .flatMap(cookieHeader -> Cookie.fromCookieHeader(cookieHeader).stream())
                      .map(cookie -> new CookieConverter(cookie, version))
                      .collect(toMap(CookieConverter::name, CookieConverter::toJaxrsSetCookie));
    }
A utility to handle conversions between {@link Cookie} and JAX-RS' {javax.ws.rs.core.Cookie} and
{@link javax.ws.rs.core.NewCookie}.
resteasy/src/main/java/com/linecorp/armeria/internal/common/resteasy/CookieConverter.java