private Thread runInsertionInSeparateThread(final CacheKey key, final WriterCallback callback) {
    Runnable runnable =
        new Runnable() {

          @Override
          public void run() {
            try {
              mCache.insert(key, callback);
            } catch (IOException e) {
              fail();
            }
          }
        };
    Thread thread = new Thread(runnable);
    thread.setDaemon(true);
    thread.start();
    return thread;
  }
Verify that multiple threads can write to the cache at the same time.
imagepipeline-base/src/test/java/com/facebook/cache/disk/DiskStorageCacheTest.java