private MockMaker resolveInlineMockMaker() {
    MockitoFramework framework = Mockito.framework();
    MockitoPlugins plugins = framework.getPlugins();
    try {
      //First: Try to retrieve the inline mockMaker used by Mockito >= 5.6.0 public API, to share the same mocking state.
      MockMaker mockMaker = (MockMaker) InvokerHelper.invokeMethod(plugins, "getMockMaker", INLINE);
      return requireNonNull(mockMaker);

    } catch (Exception ignored) {
      try {
        //Second: Try to retrieve the inline mockMaker used by Mockito < 5.6.0 with private method, to share the same mocking state.
        MockMaker mockMaker = (MockMaker) InvokerHelper.invokeStaticMethod(MockUtil.class, "getMockMaker", INLINE);
        return requireNonNull(mockMaker);

      } catch (Exception ignored2) {
        //Fallback: Use our own InlineMockMaker instance from the Mockito public plugin API, but this will degrade the interoperability with Mockito static mocks.
        //The own InlineMockMaker created here, does not share its state with the Mockito mock maker.
        //It will work for all features, but if a class is mocked with both mock makers, it will yield strange behavior.
        return plugins.getInlineMockMaker();
      }
    }
  }
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