private void verifyListenerOnWriteAttempt(CacheKey key) {
    ArgumentCaptor<CacheEvent> cacheEventCaptor = ArgumentCaptor.forClass(CacheEvent.class);
    mCacheEventListenerInOrder
        .verify(mCacheEventListener)
        .onWriteAttempt(cacheEventCaptor.capture());

    CacheEventAssert.assertThat(cacheEventCaptor.getValue()).isNotNull().hasCacheKey(key);
  }
Verify that multiple threads can write to the cache at the same time.
imagepipeline-base/src/test/java/com/facebook/cache/disk/DiskStorageCacheTest.java