Object makeMock(IMockMaker.IMockCreationSettings settings) throws CannotCreateMockException {
    try {
      MockSettings mockitoSettings = Mockito.withSettings();
      mockitoSettings.mockMaker(INLINE);
      if (!settings.getAdditionalInterface().isEmpty()) {
        mockitoSettings.extraInterfaces(settings.getAdditionalInterface().toArray(CLASS_ARRAY));
      }
      if (settings.getConstructorArgs() != null) {
        mockitoSettings.useConstructor(settings.getConstructorArgs().toArray());
      } else if (settings.getMockNature() == MockNature.SPY) {
        //We need to say Mockito it shall use the constructor otherwise it will not initialize fields of the spy, see org.mockito.Mockito.spy(java.lang.Class<T>), which does the same
        mockitoSettings.useConstructor();
      }

      //We do not need the verification logic of Mockito
      mockitoSettings.stubOnly();

      applyMockMakerSettingsFromUser(settings, mockitoSettings);

      MockCreationSettings<?> mockitoCreationSettings = mockitoSettings.build(settings.getMockType());
      SpockMockHandler handler = new SpockMockHandler(settings.getMockInterceptor());

      return inlineMockMaker.createMock(mockitoCreationSettings, handler);
    } catch (MockitoException ex) {
      throw cannotCreateMockException(settings.getMockType(), ex);
    }
  }
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