@Test
  public void testBatchMode() {
    mFadeDrawable.beginBatchMode();
    mFadeDrawable.reset();
    mFadeDrawable.fadeInLayer(1);
    mFadeDrawable.fadeOutLayer(0);
    mFadeDrawable.fadeOutAllLayers();
    mFadeDrawable.fadeToLayer(2);
    mFadeDrawable.fadeUpToLayer(1);
    mFadeDrawable.finishTransitionImmediately();
    mFadeDrawable.endBatchMode();
    verify(mCallback, times(1)).invalidateDrawable(mFadeDrawable);
    Assert.assertEquals(255, mFadeDrawable.mAlphas[0]);
    Assert.assertEquals(255, mFadeDrawable.mAlphas[1]);
    Assert.assertEquals(0, mFadeDrawable.mAlphas[2]);
    Assert.assertEquals(true, mFadeDrawable.mIsLayerOn[0]);
    Assert.assertEquals(true, mFadeDrawable.mIsLayerOn[1]);
    Assert.assertEquals(false, mFadeDrawable.mIsLayerOn[2]);
  }
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