@Test
  public void testContains() {
    mCache =
        createDummyAdaptiveCountingMemoryCache(
            mParamsSupplier,
            mCacheTrimStrategy,
            mValueDescriptor,
            100,
            1,
            2,
            initialLFUCacheFractionPromil);
    assertFalse(mCache.contains(KEY));

    CloseableReference<Integer> newRef = mCache.cache(KEY, newReference(100));

    assertTrue(mCache.contains(KEY));
    assertFalse(mCache.contains(KEYS[0]));

    newRef.close();

    assertTrue(mCache.contains(KEY));
    assertFalse(mCache.contains(KEYS[0]));

    CloseableReference<Integer> reuse = mCache.reuse(KEY);
    reuse.close();

    assertFalse(mCache.contains(KEY));
    assertFalse(mCache.contains(KEYS[0]));
  }
test: pass illegal adaptive rate and illegal initial LFU cache fraction. expected result: fall
back and use the default adaptive rate and initial LFU fraction values.
imagepipeline-base/src/test/java/com/facebook/imagepipeline/cache/AbstractAdaptiveCountingMemoryCacheTest.java