@Beta
public Object createMock(@Nullable String name, Type type, MockNature nature,
MockImplementation implementation, Map<String, Object> options, @Nullable Closure closure) {
Object mock = CompositeMockFactory.INSTANCE.create(
new MockConfiguration(name, type, nature, implementation, options), (Specification) this);
if (closure != null) {
GroovyRuntimeUtil.invokeClosure(closure, mock);
}
return mock;
}