@Override
          public void write(OutputStream os) throws IOException {
            try {
              // Both threads will need to hit this barrier. If writing is serialized,
              // the second thread will never reach here as the first will hold
              // the write lock forever.
              barrier.await(10, TimeUnit.SECONDS);
            } catch (Exception e) {
              throw new RuntimeException(e);
            }
          }
Verify that multiple threads can write to the cache at the same time.
imagepipeline-base/src/test/java/com/facebook/cache/disk/DiskStorageCacheTest.java