MetricsStatsCounter implements StatsCounter { @Override public void recordMisses(int count) { missCount.inc(count); } MetricsStatsCounter(MetricRegistry registry, String metricsPrefix); @Override void recordHits(int count); @Override void recordMisses(int count); @Override void recordLoadSuccess(long loadTime); @Override void recordLoadFailure(long loadTime); @Override @SuppressWarnings("deprecation") void recordEviction(); @Override void recordEviction(int weight); @Override void recordEviction(@NonNegative int weight, RemovalCause cause); @Override CacheStats snapshot(); @Override String toString();  }
@Test public void miss() { stats.recordMisses(2); assertThat(registry.counter(PREFIX + ".misses").getCount()).isEqualTo(2); }