@Nullable
  public static String getterMethodToPropertyName(String methodName, List<Class<?>> parameterTypes, Class<?> returnType) {
    if (!parameterTypes.isEmpty()) return null;
    if (returnType == void.class) return null; // Void.class is allowed

    if (methodName.startsWith(GET))
      return getPropertyName(methodName, 3);

    if (methodName.startsWith(IS)
        && returnType == boolean.class) // Boolean.class is not allowed
      return getPropertyName(methodName, 2);

    return null;
  }
Checks if the given method is a getter method according
to Groovy rules. If yes, the corresponding property name
is returned. Otherwise, null is returned.
This method differs from Groovy 1.6.8 in that the latter
doesn't support the "is" prefix for static boolean properties;
however, that seems more like a bug.
See https://jira.codehaus.org/browse/GROOVY-4206
spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java