NullCacheImplementation implements Cache { @Override public void clear() {}  @Override void put(String key, Serializable value); @Override void put(String key, Object value); @Override Object get(String key); @Override void remove(String key); @Override List<String> getKeys(); @Override void clear(); @Override int size(); @Override void put(String key, Serializable value, long ttl); @Override void put(String key, Object value, long ttl);  }
@Test public void testClear() throws Exception { NullCacheImplementation cache = new NullCacheImplementation(); initAndStart(cache); try { cache.put("one", "1"); assertEquals(0, cache.size()); cache.clear(); assertEquals(0, cache.size()); } finally { stopAndClose(cache); } }