NullCacheImplementation implements Cache { @Override public List<String> getKeys() { return new ArrayList<String>(); }  @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 testGetKeys() throws Exception { NullCacheImplementation cache = new NullCacheImplementation(); initAndStart(cache); try { assertEquals(0, cache.getKeys().size()); List<String> x = cache.getKeys(); List<String> y = cache.getKeys(); assertFalse(x == y); } finally { stopAndClose(cache); } }