public static GenericDraweeHierarchyBuilder mockGenericDraweeHierarchyBuilder() {
    GenericDraweeHierarchyBuilder builder =
        // NULLSAFE_FIXME[Not Vetted Third-Party]
        mock(GenericDraweeHierarchyBuilder.class, CALLS_REAL_METHODS);
    doAnswer(
            new Answer<Object>() {
              @Override
              public DraweeHierarchy answer(InvocationOnMock invocation) throws Throwable {
                return mockDraweeHierarchy();
              }
            })
        .when(builder)
        .build();
    return builder;
  }
Creates a mock GenericDraweeHierarchyBuilder that builds a new DH instance each time.

@return mock GenericDraweeHierarchyBuilder
drawee/src/test/java/com/facebook/drawee/testing/DraweeMocks.java