@Override
    public V replace(K key, V newValue) {
        return cache.getAndReplace(key, newValue);
    }
@Test
    public void testReplace() {
        cache.put(42, "oldValue");

        String oldValue = adapter.replace(42, "newValue");

        assertEquals("oldValue", oldValue);
        assertEquals("newValue", cache.get(42));
    }