### Question:
WeakKeySoftValueLoadingCache { @Nullable public V get(K key) { final CacheValue<K, V> cacheValue = cache.get(key); if (cacheValue != null) { return cacheValue.get(key); } else { CacheValue<K, V> value = new CacheValue<>(key, valueSupplier); cache.put(key, value); return value.get(key); } } WeakKeySoftValueLoadingCache(ValueSupplier<K, V> valueSupplier); @Nullable V get(K key);  }### Answer:
@Test void testGet() { WeakKeySoftValueLoadingCache<String, String> cache = new WeakKeySoftValueLoadingCache<>(String::toUpperCase); String value = cache.get("foo"); assertThat(value).isEqualTo("FOO"); assertThat(cache.get("foo")).isSameAs(value); }
@Test void testGetNull() { WeakKeySoftValueLoadingCache<String, String> cache = new WeakKeySoftValueLoadingCache<>(key -> null); assertThat(cache.get("foo")).isNull(); }