Max Age < 0 not supported by Rest-Assured
<p>In Cookie.java it throws an exception when we send cookie with max-age as negative for expiring the cookie.</p>

<p>As is clear in their code </p>

<pre><code>/**
 * Set the maximum age of the cookie, specified in seconds,
 * By default, &lt;code&gt;-1&lt;/code&gt; indicating the cookie will persist
 * until browser shutdown.
 *
 * @return   an integer specifying the maximum age of the
 *              cookie in seconds; if negative, means
 *              the cookie persists until browser shutdown
 */
public Builder setMaxAge(int maxAge) {
    if(maxAge &lt; 0) {
        throw new IllegalArgumentException("Max-Age cannot be less than 0");
    }
    this.maxAge = maxAge;
    return this;
}
</code></pre>

<p>The comments however supports a negative value though and clearly indicates negative value means the cookie persists until browser shutdown.</p>

<p>Is their any way around where I can send a cookie in response with a negative value for max-age as the issue is not yet handled in their code?</p>