source: class ContentCacheImplTest {
  
      private ContentCacheImpl contentCache;
      private @Mock SimpleCache<Key, String> lookupTable;
  
      @Test
      public void getWriter()
      {
  
target:         final String url = "store://some/url.bin";
          
          FileContentWriter writer = (FileContentWriter) contentCache.getWriter(url);
          writer.putContent("Some test content for " + getClass().getName());
          
          assertEquals(url, writer.getContentUrl());
          // Check cached item is recorded properly in ehcache
          Mockito.verify(lookupTable).put(Key.forUrl(url), writer.getFile().getAbsolutePath());
          Mockito.verify(lookupTable).put(Key.forCacheFile(writer.getFile().getAbsolutePath()), url);
      }
  
  }