@Test public void testRemove() throws Exception { assertNull(cache.remove(new Integer(1))); cache.put(new Integer(1), "apple"); assertEquals("apple", cache.remove(new Integer(1))); assertNull(cache.get(new Integer(1))); assertEquals(0, cache.size()); }
public byte[] removeOverwriteBackup(Long key) { cache.remove(key); return overwriteBackup.remove(key); }
@Override protected Long selfRemove(String key) { return memoryMap.remove(key) != null ? 1L : 0L; }