private void testImmediateTransition(boolean fadeUpToLayer) {
    resetInteractions();
    if (fadeUpToLayer) {
      mFadeDrawable.fadeUpToLayer(1);
    } else {
      mFadeDrawable.fadeToLayer(1);
    }
    Assert.assertEquals(fadeUpToLayer, mFadeDrawable.mIsLayerOn[0]);
    Assert.assertEquals(true, mFadeDrawable.mIsLayerOn[1]);
    Assert.assertEquals(false, mFadeDrawable.mIsLayerOn[2]);
    verify(mCallback).invalidateDrawable(mFadeDrawable);

    mFadeDrawable.finishTransitionImmediately();
    verify(mCallback, times(2)).invalidateDrawable(mFadeDrawable);
    Assert.assertEquals(fadeUpToLayer ? 255 : 0, mFadeDrawable.mAlphas[0]);
    Assert.assertEquals(255, mFadeDrawable.mAlphas[1]);
    Assert.assertEquals(0, mFadeDrawable.mAlphas[2]);
    Assert.assertEquals(FadeDrawable.TRANSITION_NONE, mFadeDrawable.mTransitionState);
  }
Tests {@link FadeDrawable} where all layers are visible per default. * @see FadeDrawableTest for
more tests
drawee/src/test/java/com/facebook/drawee/drawable/FadeDrawableAllOnTest.java