@Test
  public void testCleanOldCacheNoEntriesRemaining() throws IOException {
    long cacheExpirationMs = TimeUnit.DAYS.toMillis(5);
    CacheKey key1 = new SimpleCacheKey("aaa");
    byte[] value1 = new byte[41];
    mCache.insert(key1, WriterCallbacks.from(value1));

    CacheKey key2 = new SimpleCacheKey("bbb");
    byte[] value2 = new byte[42];
    mCache.insert(key2, WriterCallbacks.from(value2));

    // Increment clock by default expiration time + 1 day
    when(mClock.now()).thenReturn(cacheExpirationMs + TimeUnit.DAYS.toMillis(1));

    long oldestEntry = mCache.clearOldEntries(cacheExpirationMs);
    assertEquals(0L, oldestEntry);
  }
Tests size based file eviction of cache files. Also tests that unexpected files (which are not
in the format expected by the cache) do not count towards the cache size, and are also evicted
during both evictions (LRU and Old).

@throws Exception
imagepipeline-base/src/test/java/com/facebook/cache/disk/DiskStorageCacheTest.java