@Override
  public T computeIfAbsent(String key, Function<String, T> supplier) {
    return cache.compute(
        key,
        (String k, T current) -> {
          if (isValidLongEnough(current)) {
            return current;
          }
          return supplier.apply(key);
        });
  }
@Test
  void fetchesRightOne() {
    var ttl = Duration.ofSeconds(10);

    var sut = new InMemoryCacheImpl<CacheEntry>(Clock.fixed(NOW, ZoneId.of("UTC")), ttl);

    var source =
        IntStream.range(0, 10)
            .mapToObj(i -> CacheEntry.of(Integer.toString(i), NOW.plusSeconds(60)))
            .collect(Collectors.toMap(CacheEntry::value, Function.identity()));

    var rand = new Random(42L);
    for (int i = 0; i < 30; i++) {
      var key = Integer.toString(rand.nextInt(source.size()));

      // when
      var r = sut.computeIfAbsent(key, source::get);

      // then
      assertEquals(key, r.value());
    }
  }