@Test
  public void testIndexIsReadyIfIndexAtStartupIsOnAndTheBackgroundExecutorHasRun() {
    DiskStorageCache cache = createDiskCache(mStorage, true);

    mBackgroundExecutor.runUntilIdle();

    assertThat(cache.isIndexReady()).isTrue();
  }
Verify that multiple threads can write to the cache at the same time.
imagepipeline-base/src/test/java/com/facebook/cache/disk/DiskStorageCacheTest.java