private <T> T createWithAppropriateMockMaker(IMockCreationSettings settings, BiFunction<IMockMaker, IMockCreationSettings, T> code) {
    for (IMockMaker mockMaker : makerList) {
      if (isMockable(mockMaker, settings).isMockable()) {
        return code.apply(mockMaker, settings);
      }
    }
    IMockabilityResult typeMockable = collectNotMockableReasons(settings);
    throw new CannotCreateMockException(settings.getMockType(), "." + NL + typeMockable.getNotMockableReason());
  }
Returns {@code true} if the passed class is a Spock static mock currently active on the current {@link Thread}.

@param clazz the class to check
@return {@code true} if this class is a Spock static mock currently active on the current {@code Thread}
spock-core/src/main/java/org/spockframework/mock/runtime/MockMakerRegistry.java