@Test
  public void testDisableMemoryCache() {
    setUpCacheEnabled(false);
    setupBitmapMemoryCacheGetNotFound();
    setupInputProducerStreamingSuccess();
    when(mMemoryCache.get(mBitmapMemoryCacheKey)).thenReturn(null);
    when(mImageRequest.isMemoryCacheEnabled()).thenReturn(false);
    mBitmapMemoryCacheProducer.produceResults(mConsumer, mProducerContext);
    verify(mMemoryCache, never())
        .cache(any(BitmapMemoryCacheKey.class), any(CloseableReference.class));
  }
Checks basic properties of bitmap memory cache producer operation, that is: - it delegates to the
{@link MemoryCache#get(Object)} - if {@link MemoryCache#get(Object)} is unsuccessful, then it
passes the request to the next producer in the sequence. - if the next producer returns the value
of higher quality, then it is put into the bitmap cache. - responses from the next producer are
passed back down to the consumer.
imagepipeline/src/test/java/com/facebook/imagepipeline/producers/BitmapMemoryCacheProducerTest.java