@SuppressWarnings("deprecated")
    default Instant getExpiryInstant() {
        final Date date = getExpiryDate();
        return date != null ? Instant.ofEpochMilli(date.getTime()) : null;
    }
Returns the expiration {@link Instant} of the cookie, or {@code null} if none exists.
<p><strong>Note:</strong> the object returned by this method is
considered immutable. Changing it (e.g. using setTime()) could result in undefined behaviour.
Do so at your peril. </p>

@return Expiration {@link Instant}, or {@code null}.
@since 5.2
httpclient5/src/main/java/org/apache/hc/client5/http/cookie/Cookie.java