public Object makeMock(IMockCreationSettings settings) throws CannotCreateMockException {
    if (settings.isStaticMock()) {
      throw new IllegalArgumentException("Can't mock static mocks with makeMock().");
    }
    return makeMockInternal(settings, IMockMaker::makeMock);
  }
Mocks the type provided by the {@code settings}.

@param settings the mock settings
@return the new instance of the mocked type defined by the settings
@throws CannotCreateMockException if a mock with the provided settings can't be created.
spock-core/src/main/java/org/spockframework/mock/runtime/MockMakerRegistry.java