private void assertGhostListsValidSize() {
    assertTrue(
        "LFU keys ghost list overflows",
        mCache.mLeastFrequentlyUsedKeysGhostList.size() <= mCache.mGhostListMaxSize);
    assertTrue(
        "MFU keys ghost list overflows",
        mCache.mMostFrequentlyUsedKeysGhostList.size() <= mCache.mGhostListMaxSize);
  }
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