ContentCacheImpl implements ContentCache { @Override public boolean contains(String contentUrl) { return memoryStore.contains(Key.forUrl(contentUrl)); }  @Override boolean contains(String contentUrl); boolean contains(Key key); void putIntoLookup(Key key, String value); String getCacheFilePath(String contentUrl); String getContentUrl(File file); @Override ContentReader getReader(String contentUrl); @Override boolean put(String contentUrl, ContentReader source); @Override void remove(String contentUrl); void removeAll(); @Override void deleteFile(String url); @Override ContentWriter getWriter(final String url); static String createNewCacheFilePath(); void setMemoryStore(SimpleCache<Key, String> memoryStore); void setCacheRoot(File cacheRoot); @Override File getCacheRoot(); void processFiles(FileHandler handler);  }
@Test public void contains() { final String url = "store: Mockito.when(lookupTable.contains(Key.forUrl(url))).thenReturn(true); assertTrue(contentCache.contains(Key.forUrl(url))); assertTrue(contentCache.contains(url)); Mockito.when(lookupTable.contains(Key.forUrl(url))).thenReturn(false); assertFalse(contentCache.contains(Key.forUrl(url))); assertFalse(contentCache.contains(url)); }