@Nullable
  @Override
  public Session load(@NonNull String sessionId) {
    var session = store.getIfPresent(sessionId);
    if (session == null || session.createdAt().plus(timeToLive).isBefore(Instant.now())) {
      return null;
    }
    return session;
  }
@Test
  void load_realCache_bounded() {

    var maxSize = 10;
    var ttl = Duration.ofMinutes(5);
    Cache<String, Session> store = Caffeine.newBuilder().maximumSize(maxSize).build();
    var sut = new CaffeineSessionRepo(store, ttl);

    var state = "myState";
    var nonce = UUID.randomUUID().toString();
    var redirectUri = URI.create("https://example.com/callback");
    var clientId = "app";

    var sesionIds = IntStream.range(0, 100).mapToObj(Integer::toString).toList();

    sesionIds.stream()
        .map(
            i ->
                Session.create()
                    .id(i)
                    .state(state)
                    .nonce(nonce)
                    .redirectUri(redirectUri)
                    .clientId(clientId)
                    .build())
        .forEach(sut::save);

    store.cleanUp();

    // when
    var remainingCount =
        sesionIds.stream().flatMap(id -> Optional.ofNullable(sut.load(id)).stream()).count();

    // then
    assertEquals(maxSize, remainingCount);
  }