public static GenericDraweeHierarchy mockDraweeHierarchyOf(Drawable topLevelDrawable) {
    GenericDraweeHierarchy gdh = mock(GenericDraweeHierarchy.class);
    when(gdh.getTopLevelDrawable()).thenReturn(topLevelDrawable);
    return gdh;
  }
Creates a mock GenericDraweeHierarchy with some methods stubbed.

@param topLevelDrawable drawable to return on {@code getTopLevelDrawable()}
@return mock GenericDraweeHierarchy
drawee/src/test/java/com/facebook/drawee/testing/DraweeMocks.java