public static <T> T bindMock(final Binder binder, final Class<T> classToMock) {
        Objects.requireNonNull(binder);
        Objects.requireNonNull(classToMock);

        final T mock = Mockito.mock(classToMock);
        binder.bind(classToMock)
                .toInstance(mock);
        return mock;
    }
Binds classToMock to a {@link Mockito} mock of that class
<p>
Consider using {@link AbstractTestModule#bindMock(Class)} instead.
</p>

@return The mock instance in case you want to add behaviour to it.
stroom-test-common/src/main/java/stroom/test/common/util/guice/GuiceTestUtil.java