code: @Deprecated
    public static Expiry<Object, Object> timeToLiveExpiration(Duration timeToLive) {
      if (timeToLive == null) {
        throw new NullPointerException("Duration cannot be null");
      }
      return new TimeToLiveExpiry(timeToLive);
    }
docs: Get a time-to-live (TTL) {@link Expiry} instance for the given {@link Duration}.
  
  @param timeToLive the TTL duration
  @return a TTL expiry
  
  @deprecated Use {@code org.ehcache.config.builders.ExpiryPolicyBuilder#timeToLiveExpiration(java.time.Duration)} instead