@Override
              public Boolean answer(InvocationOnMock invocation) throws Throwable {
                boolean initialValue = isVisible.get();
                boolean newValue = (Boolean) invocation.getArguments()[0];
                if (callback.get() != null) {
                  isVisible.set(newValue);
                  callback.get().onVisibilityChange(isVisible.get());
                }
                return initialValue != newValue;
              }
Stubs setVisibilityCallback methods.

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