@VisibleForTesting
  static boolean isLocalMock(Class<?> targetClass, Collection<Class<?>> additionalInterfaces) {
    // Inspired by https://github.com/mockito/mockito/blob/99426415c0ceb30e55216c3934854528c83f410e/mockito-core/src/main/java/org/mockito/internal/creation/bytebuddy/SubclassBytecodeGenerator.java#L165-L166
    ClassLoader cl = new MultipleParentClassLoader.Builder()
      .appendMostSpecific(targetClass)
      .appendMostSpecific(additionalInterfaces)
      .appendMostSpecific(ISpockMockObject.class)
      .build();
    return cl == targetClass.getClassLoader();
  }
Returns {@code true}, if the mock is considered local
<p>
A mock is considered local, if all additional interfaces of the mock (including {@link ISpockMockObject}) are
loadable by the target class' classloader.

@param targetClass The to-be-mocked class
@param additionalInterfaces Additional interfaces of the to-be-mocked type
@return true, if this is a local mock. Otherwise false
spock-core/src/main/java/org/spockframework/mock/runtime/ByteBuddyMockFactory.java