CacheAccessTracker implements Cache<K,V> { @Nullable @Override public V get(@NotNull K key) { V v = delegate.get(key); accessCount.inc(); if (v == null) { missCount.inc(); } return v; } CacheAccessTracker(
            @NotNull String name,
            @NotNull StatisticsProvider statisticsProvider,
            @NotNull Cache<K, V> delegate); @Override void put(@NotNull K key, @NotNull V value); @Override void put(@NotNull K key, @NotNull V value, byte cost); @Nullable @Override V get(@NotNull K key);  }
@Test public void testMissOnEmpty() { cache.get("non existing"); assertEquals(1, accessStats.getCount()); assertEquals(1, missStats.getCount()); }