public static GenericDraweeHierarchyBuilder mockBuilderOf(
      GenericDraweeHierarchy... drawableHierarchies) {
    GenericDraweeHierarchyBuilder builder =
        // NULLSAFE_FIXME[Not Vetted Third-Party]
        mock(GenericDraweeHierarchyBuilder.class, CALLS_REAL_METHODS);
    final Supplier<GenericDraweeHierarchy> gdhProvider = supplierOf(drawableHierarchies);
    doAnswer(
            new Answer() {
              @Override
              public Object answer(InvocationOnMock invocation) throws Throwable {
                return gdhProvider.get();
              }
            })
        .when(builder)
        .build();
    return builder;
  }
Creates a mock GenericDraweeHierarchyBuilder with stubbed build.

@param drawableHierarchies drawable hierarchies to return on {@code build()}
@return mock GenericDraweeHierarchyBuilder
drawee/src/test/java/com/facebook/drawee/testing/DraweeMocks.java