@Test
  public void testAccessCountUpdate() {
    // Cache has 4 entries; 2 for LFU and 2 for MFU
    // key is considered as MFU, if its accessCount > 1
    mCache =
        createDummyAdaptiveCountingMemoryCache(
            mParamsSupplier,
            mCacheTrimStrategy,
            mValueDescriptor,
            100,
            1,
            2,
            initialLFUCacheFractionPromil);

    // add MFU item1
    CloseableReference<Integer> originalRef1 = newReference(10);
    CloseableReference<Integer> valueRef1 = mCache.cache(KEYS[1], originalRef1);
    CloseableReference<Integer> valueRef1a = mCache.get(KEYS[1]);
    originalRef1.close();
    assertSharedWithCount(KEYS[1], 10, 2);
    assertSharedWithAccessCount(KEYS[1], 10, 2);

    // close the first reference
    valueRef1.close();
    assertSharedWithCount(KEYS[1], 10, 1);
    assertSharedWithAccessCount(KEYS[1], 10, 2);
    valueRef1a.close();
  }
Test: insert one item to the cache, access it twice, then close the first reference to the
item. Expected: after closing the reference, the ClientCount should be decreased while the
accessCount should not change.
imagepipeline-base/src/test/java/com/facebook/imagepipeline/cache/AbstractAdaptiveCountingMemoryCacheTest.java