public void clear() {
    cacheMap.clear();
  }
@Test
  public void testClear() {
    LruCache<String, SimpleValue> cache = new LruCache<String, SimpleValue>(2);

    String key1 = DEFAULT_KEY + 1;
    String key2 = DEFAULT_KEY + 2;
    SimpleValue value = new SimpleValue(true, true);
    cache.put(key1, value);
    cache.put(key2, value);
    assertEquals(value, cache.getCurrentValue(key1));
    assertEquals(value, cache.getCurrentValue(key2));
    assertEquals(2, cache.size());

    cache.clear();
    assertNull(cache.getCurrentValue(key1));
    assertNull(cache.getCurrentValue(key2));
    assertEquals(0, cache.size());
  }