@Test
  public void testSetIsIntermediateResultExpected() {
    mSettableProducerContext.addCallbacks(mCallbacks1);
    assertTrue(mSettableProducerContext.isIntermediateResultExpected());
    mSettableProducerContext.setIsIntermediateResultExpected(false);
    assertFalse(mSettableProducerContext.isIntermediateResultExpected());
    verify(mCallbacks1).onIsIntermediateResultExpectedChanged();
    mSettableProducerContext.setIsIntermediateResultExpected(false);
    // only one callback is expected
    verify(mCallbacks1).onIsIntermediateResultExpectedChanged();
  }
Checks basic properties of NullProducer, that is that it always returns null.
imagepipeline/src/test/java/com/facebook/imagepipeline/producers/SettableProducerContextTest.java