code: @Override
    @SuppressForbidden("legitimate sysstreams.")
    public void setOuter(JUnit4 task) {
      this.seed = task.getSeed();
  
      if (outputFile != null) {
        try {
          Files.createParentDirs(outputFile);
          final CharSink charSink;
          if (append) {
            charSink = Files.asCharSink(outputFile, Charsets.UTF_8, FileWriteMode.APPEND);
          } else {
            charSink = Files.asCharSink(outputFile, Charsets.UTF_8);
          }
          this.output = charSink.openBufferedStream();
        } catch (IOException e) {
          throw new BuildException(e);
        }
      } else {
        if (!UNICODE_ENCODINGS.contains(Charset.defaultCharset().name())) {
          task.log("Your default console's encoding may not display certain" +
              " unicode glyphs: " + Charset.defaultCharset().name(), 
              Project.MSG_INFO);
        }
        output = new LineFlushingWriter(new OutputStreamWriter(System.out, Charset.defaultCharset())) {
          @Override
          // Don't close the underlying stream, just flush.
          public void close() throws IOException {
            flush();
          }
        };
      }
    }
docs: Initialization by container task {@link JUnit4}.