GuavaCacheBasedSupplierMemoizer extends AbstractGuavaCacheBasedMemoizer<KEY, OUTPUT> implements Supplier<OUTPUT> { @Override public OUTPUT get() { return get(keySupplier.get(), givenKey -> supplier.get()); } GuavaCacheBasedSupplierMemoizer(
            final Cache<KEY, OUTPUT> cache,
            final Supplier<KEY> keySupplier,
            final Supplier<OUTPUT> supplier); @Override OUTPUT get();  }
@Test public void shouldReturnSuppliedValue() { final Supplier<String> supplier = () -> "value"; final Supplier<String> keySupplier = () -> "key"; final Cache<String, String> cache = CacheBuilder.newBuilder().build(); final GuavaCacheBasedSupplierMemoizer<String, String> memoizer = new GuavaCacheBasedSupplierMemoizer<>(cache, keySupplier, supplier); Assert.assertEquals("value", memoizer.get()); }