@Override
    public boolean remove(K key) {
        return cache.remove(key) != null;
    }
@Test
    public void testRemove() {
        Cache<String, String> cache = new LRUCache<>(4);

        cache.put("a", "b");
        cache.put("c", "d");
        cache.put("e", "f");
        assertEquals(3, cache.size());

        assertTrue(cache.remove("a"));
        assertEquals(2, cache.size());
        assertNull(cache.get("a"));
        assertEquals("d", cache.get("c"));
        assertEquals("f", cache.get("e"));

        assertFalse(cache.remove("key-does-not-exist"));

        assertTrue(cache.remove("c"));
        assertEquals(1, cache.size());
        assertNull(cache.get("c"));
        assertEquals("f", cache.get("e"));

        assertTrue(cache.remove("e"));
        assertEquals(0, cache.size());
        assertNull(cache.get("e"));
    }