@Test
  public void testChangeNonHighestToLowerPriorityDoesNotChangePriority() {
    mProducerContext1.setPriority(Priority.HIGH);
    mProducerContext2.setPriority(Priority.HIGH);
    mMultiplexProducer.produceResults(mConsumer1, mProducerContext1);
    mMultiplexProducer.produceResults(mConsumer1, mProducerContext2);
    assertEquals(Priority.HIGH, mMultiplexedContext1.getPriority());
    mProducerContext1.setPriority(Priority.MEDIUM);
    assertEquals(Priority.HIGH, mMultiplexedContext1.getPriority());
  }
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