@Override
    public void write(Cache.Entry<? extends K, ? extends V> entry) throws CacheWriterException {
        long startNanos = Timer.nanos();
        try {
            delegate.get().write(entry);
        } finally {
            writeProbe.recordValue(Timer.nanosElapsed(startNanos));
        }
    }
@Test
    public void write() {
        Cache.Entry<Integer, String> entry = new CacheEntry<>(1, "peter");
        cacheWriter.write(entry);

        verify(delegate).write(entry);
        assertProbeCalledOnce("write");
    }