protected final void setAccessExpireTime(K key, Expirable<?> expirable, long currentTimeMS) {
    try {
      Duration duration = expiry.getExpiryForAccess();
      if (duration == null) {
        return;
      } else if (duration.isZero()) {
        expirable.setExpireTimeMS(0L);
      } else if (duration.isEternal()) {
        expirable.setExpireTimeMS(Long.MAX_VALUE);
      } else {
        if (currentTimeMS == 0L) {
          currentTimeMS = currentTimeMillis();
        }
        long expireTimeMS = duration.getAdjustedTime(currentTimeMS);
        expirable.setExpireTimeMS(expireTimeMS);
      }
      cache.policy().expireVariably().ifPresent(policy -> {
        policy.setExpiresAfter(key, duration.getDurationAmount(), duration.getTimeUnit());
      });
    } catch (RuntimeException e) {
      logger.log(Level.WARNING, "Failed to set the entry's expiration time", e);
    }
  }
@Test
  public void setAccessExpireTime_eternal() {
    when(expiry.getExpiryForAccess()).thenReturn(Duration.ETERNAL);
    var expirable = new Expirable<Integer>(KEY_1, 0);
    jcache.setAccessExpireTime(KEY_1, expirable, 0);
    assertThat(expirable.getExpireTimeMS()).isEqualTo(Long.MAX_VALUE);
  }