public static void stubGetBitmap(Drawable drawable) {
    if (!(drawable instanceof BitmapDrawable)) {
      return;
    }
    BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
    final Bitmap bitmap = mock(Bitmap.class);
    // NULLSAFE_FIXME[Parameter Not Nullable]
    when(bitmapDrawable.getBitmap()).thenReturn(bitmap);
  }
Stubs getBitmap for BitmapDrawables.

@param drawable drawable to stub methods of
drawee/src/test/java/com/facebook/drawee/drawable/DrawableTestUtils.java