@Beta
  public Object createDetachedMock(@Nullable String name, Object obj, MockNature nature,
      MockImplementation implementation, Map<String, Object> options,  ClassLoader classloader) {

    Object mock = CompositeMockFactory.INSTANCE.createDetached(
        new MockConfiguration(name, obj.getClass(), obj, nature, implementation, options), classloader);
    return mock;
  }
Creates a detached mock.

@param name the name
@param obj the existing object to wrap
@param nature the nature
@param implementation the implementation
@param options the options
@param classloader the classloader to use
@return the mock
spock-core/src/main/java/org/spockframework/mock/MockUtil.java