private boolean hasExpandableVarArgs(IMockMethod method, List<Object> args) {
    List<Class<?>> paramTypes = method.getParameterTypes();
    return !paramTypes.isEmpty()
        && CollectionUtil.getLastElement(paramTypes).isArray()
        && CollectionUtil.getLastElement(args) != null;
  }
Tells if the given method call has expandable varargs. Note that Groovy
supports vararg syntax for all methods whose last parameter is of array type.
spock-core/src/main/java/org/spockframework/mock/constraint/PositionalArgumentListConstraint.java