@Nullable
              @Override
              public Void answer(InvocationOnMock invocation) throws Throwable {
                if (mForwardingConsumer1 == null) {
                  mForwardingConsumer1 = (Consumer) invocation.getArguments()[0];
                  mMultiplexedContext1 = (BaseProducerContext) invocation.getArguments()[1];
                } else {
                  mForwardingConsumer2 = (Consumer) invocation.getArguments()[0];
                  mMultiplexedContext2 = (BaseProducerContext) invocation.getArguments()[1];
                }
                return null;
              }
An extra flag to check we maintain other flags than just whether this is the last result
imagepipeline/src/test/java/com/facebook/imagepipeline/producers/MultiplexProducerTest.java