public static String printStackTrace(Throwable throwable) {
    StringWriter writer = new StringWriter();
    throwable.printStackTrace(new PrintWriter(writer));
    return writer.toString();
  }
Returns the number of whitespace characters at the end of the given line.

@param line
@return
spock-core/src/main/java/org/spockframework/util/TextUtil.java