public static long validateExpiration(String claimName, Long claimValue) throws ValidateException {
        if (claimValue == null)
            throw new ValidateException(String.format("%s value must be non-null", claimName));

        if (claimValue < 0)
            throw new ValidateException(String.format("%s value must be non-negative; value given was \"%s\"", claimName, claimValue));

        return claimValue;
    }
Validates that the given lifetime is valid, where <i>invalid</i> means <i>any</i> of
the following:

<ul>
    <li><code>null</code></li>
    <li>Negative</li>
</ul>

@param claimName  Name of the claim
@param claimValue Expiration time (in milliseconds)

@return Input parameter, as provided

@throws ValidateException Thrown if the value is <code>null</code> or negative
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/internals/secured/ClaimValidationUtils.java