### Question:
StagemonitorCacheUsageListener implements CacheUsageListener { @Override public void notifyCacheElementExpired() { registry.meter(deleteExpireMetricName).mark(); } StagemonitorCacheUsageListener(String cacheName, Metric2Registry registry, boolean timeGet); @Override void notifyStatisticsEnabledChanged(boolean enableStatistics); @Override void notifyStatisticsCleared(); @Override void notifyCacheHitInMemory(); @Override void notifyCacheHitOffHeap(); @Override void notifyCacheHitOnDisk(); @Override void notifyCacheElementPut(); @Override void notifyCacheElementUpdated(); @Override void notifyCacheMissedWithNotFound(); @Override void notifyCacheMissedWithExpired(); Ratio getHitRatio1Min(); @Override void notifyCacheMissInMemory(); @Override void notifyCacheMissOffHeap(); @Override void notifyCacheMissOnDisk(); @Override @Deprecated void notifyTimeTakenForGet(long millis); @Override void notifyGetTimeNanos(long nanos); @Override void notifyCacheElementEvicted(); @Override void notifyCacheElementExpired(); @Override void notifyCacheElementRemoved(); @Override void notifyRemoveAll(); @Override void notifyStatisticsAccuracyChanged(int statisticsAccuracy); @Override void dispose(); @Override void notifyCacheSearch(long executeTime); @Override void notifyXaCommit(); @Override void notifyXaRollback();  }### Answer:
@Test public void testExpired() throws Exception { cacheUsageListener.notifyCacheElementExpired(); final MetricName name = name("cache_delete").tag("cache_name", "cache").tag("reason", "expire").tier("All").build(); assertNotNull(registry.getMeters().get(name)); assertEquals(1, registry.getMeters().get(name).getCount()); }