IMockObject asMockOrNull(Object object) {
    MockHandler<?> mockHandler = inlineMockMaker.getHandler(object);
    if (mockHandler instanceof SpockMockHandler) {
      SpockMockHandler spockHandler = (SpockMockHandler) mockHandler;
      //This should be changed to a better API to retrieve the IMockObject, which is currently implemented in two places JavaMockInterceptor and GroovyMockInterceptor
      return (IMockObject) spockHandler.mockInterceptor.intercept(object, spockMockMethod, null, null);
    }
    return null;
  }
Resolves the inline mock maker of Mockito, via different ways, depending on the Mockito version.

@return The inline mock maker of Mockito
spock-core/src/main/java/org/spockframework/mock/runtime/mockito/MockitoMockMakerImpl.java