@Test
  public void testBitmapMemoryCacheGetNotFoundInputProducerNotFound() {
    setupBitmapCacheGetNotFound();
    setupInputProducerNotFound();
    mBitmapMemoryCacheGetProducer.produceResults(mConsumer, mProducerContext);
    verify(mConsumer).onNewResult(null, Consumer.IS_LAST);
    verify(mProducerListener).onProducerStart(mProducerContext, PRODUCER_NAME);
    Map<String, String> extraMap =
        ImmutableMap.of(BitmapMemoryCacheProducer.EXTRA_CACHED_VALUE_FOUND, "false");
    verify(mProducerListener)
        .onProducerFinishWithSuccess(mProducerContext, PRODUCER_NAME, extraMap);
    verify(mProducerListener, never())
        .onUltimateProducerReached(eq(mProducerContext), anyString(), anyBoolean());
  }
Checks basic properties of bitmap memory cache producer operation, that is: - it delegates to the
{@link MemoryCache#get(Object)}. - if get is successful, then returned reference is closed. - if
{@link MemoryCache#get(Object)} is unsuccessful, then it passes the request to the next producer
in the sequence. - responses from the next producer are passed directly to the consumer. -
listener methods are called as expected.
imagepipeline/src/test/java/com/facebook/imagepipeline/producers/BitmapMemoryCacheGetProducerTest.java