@Override
  @SuppressWarnings("NullAway")
  public @Nullable V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction,
      @Nullable Expiry<? super K, ? super V> expiry, boolean recordLoad,
      boolean recordLoadFailure) {
    requireNonNull(key);
    requireNonNull(remappingFunction);

    long[] now = { expirationTicker().read() };
    Object keyRef = nodeFactory.newReferenceKey(key, keyReferenceQueue());
    BiFunction<? super K, ? super V, ? extends V> statsAwareRemappingFunction =
        statsAware(remappingFunction, recordLoad, recordLoadFailure);
    return remap(key, keyRef, statsAwareRemappingFunction,
        expiry, now, /* computeIfAbsent */ true);
  }
@Test
  public void policy_unsupported() {
    Policy<Int, Int> policy = Mockito.mock(CALLS_REAL_METHODS);
    Eviction<Int, Int> eviction = Mockito.mock(CALLS_REAL_METHODS);
    VarExpiration<Int, Int> varExpiration = Mockito.mock(CALLS_REAL_METHODS);
    FixedExpiration<Int, Int> fixedExpiration = Mockito.mock(CALLS_REAL_METHODS);

    var type = UnsupportedOperationException.class;
    assertThrows(type, () -> policy.getEntryIfPresentQuietly(Int.MAX_VALUE));
    assertThrows(type, () -> eviction.coldestWeighted(1L));
    assertThrows(type, () -> eviction.coldest(identity()));
    assertThrows(type, () -> eviction.hottestWeighted(1L));
    assertThrows(type, () -> eviction.hottest(identity()));
    assertThrows(type, () -> fixedExpiration.oldest(identity()));
    assertThrows(type, () -> fixedExpiration.youngest(identity()));
    assertThrows(type, () -> varExpiration.oldest(identity()));
    assertThrows(type, () -> varExpiration.youngest(identity()));
    assertThrows(type, () -> varExpiration.compute(Int.MAX_VALUE, (k, v) -> v, Duration.ZERO));
  }