@Beta
  public <T> T GroovyMock(Class<T> type) {
    throw invalidMockCreation();
  }
Creates a Groovy mock with the specified type. If enclosed in a variable assignment, the variable name will be
used as the mock's name.

Example:

<pre>
  def person = GroovyMock(Person) // type is Person.class, name is "person"
</pre>

@param type the interface or class type of the Groovy mock
@param <T> the interface or class type of the Groovy mock

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