public V remove(final K key) {
    V oldValue = cacheMap.remove(key);
    if (oldValue != null) {
      LOG.debug("Removed cache entry for '{}'", key);
    }
    return oldValue;
  }
@Test
  public void testRemove() {
    LruCache<String, SimpleValue> cache = new LruCache<String, SimpleValue>(1);

    SimpleValue value = new SimpleValue(true, true);
    cache.put(DEFAULT_KEY, value);
    assertEquals(1, cache.size());
    assertEquals(value, cache.getCurrentValue(DEFAULT_KEY));

    // remove the only value
    assertEquals(value, cache.remove(DEFAULT_KEY));
    assertNull(cache.getCurrentValue(DEFAULT_KEY));
    assertEquals(0, cache.size());
  }