@Override
    public void parse(final SetCookie cookie, final String value) throws MalformedCookieException {
        Args.notNull(cookie, "Cookie");
        if (TextUtils.isBlank(value)) {
            return;
        }
        final Matcher matcher = MAX_AGE_PATTERN.matcher(value);
        if (matcher.matches()) {
            final int age;
            try {
                age = Integer.parseInt(value);
            } catch (final NumberFormatException e) {
                return;
            }
            final Date expiryDate = age >= 0 ? new Date(System.currentTimeMillis() + age * 1000L) :
                    new Date(Long.MIN_VALUE);
            cookie.setExpiryDate(expiryDate);
        }
    }
Cookie {@code max-age} attribute handler conformant to the more relaxed interpretation
of HTTP state management.

@since 4.4
ngrinder-runtime/src/main/java/org/apache/hc/client5/http/impl/cookie/LaxMaxAgeHandler.java