private void assertNotCached(String key, Integer value) {
    assertFalse("key found in the cache", mCache.mCachedEntries.contains(key));
    assertFalse(
        "key found in the exclusives",
        mCache.mLeastFrequentlyUsedExclusiveEntries.contains(key)
            || mCache.mMostFrequentlyUsedExclusiveEntries.contains(key));
  }
This test checks edge cases, when trying to increase/decrease the LFU cache fraction to more
than 1/less than 0 (of the cache size). The expected behaviour is not to update the LFU
fraction.
imagepipeline-base/src/test/java/com/facebook/imagepipeline/cache/AbstractAdaptiveCountingMemoryCacheTest.java