public static String getText(Reader reader) throws IOException {
    try(BufferedReader buffered = new BufferedReader(reader)) {
      return readFully(buffered);
    }
  }
Returns the text read from the given reader as a String.
Closes the given reader upon return.
spock-core/src/main/java/org/spockframework/util/IoUtil.java