@Beta
  public <T> T GroovyStub(
    @DelegatesTo.Target
      Class<T> type,
    @DelegatesTo(strategy = Closure.DELEGATE_FIRST, genericTypeIndex = 0)
    @ClosureParams(FirstParam.FirstGenericType.class)
      Closure interactions) {
    throw invalidMockCreation();
  }
Creates a Groovy stub with the specified type and interactions. If enclosed in a variable assignment, the variable name will be
used as the stub's name.

Example:

<pre>
  // name is "person", type is Person.class, returns hard-coded values for property {@code name} and method {@code sing()}
  def person = GroovyStub(Person) {
    name >> "Fred"
    sing() >> "Tra-la-la"
  }
</pre>

@param type the interface or class type of the Groovy stub
@param interactions a description of the Groovy stub's interactions
@param <T> the interface or class type of the Groovy stub

@return a Groovy stub with the specified type and interactions
spock-core/src/main/java/spock/mock/MockingApi.java