public void onOutput(TestDescriptor testDescriptor, TestOutputEvent outputEvent) {
   String className = testDescriptor.getClassName();
   if (className == null) {
     // this means that we receive an output before even starting any class (or too late).
     // we don't have a place for such output in any of the reports so skipping.
     return;
   }
   cachingFileWriter.write(
       outputsFile(className, outputEvent.getDestination()), outputEvent.getMessage());
 }
    public void onOutput(long classId, long testId, TestOutputEvent outputEvent) {
      boolean stdout = outputEvent.getDestination() == TestOutputEvent.Destination.StdOut;
      mark(classId, testId, stdout);

      output.writeBoolean(stdout);
      output.writeLong(classId);
      output.writeLong(testId);

      byte[] bytes;
      try {
        bytes = outputEvent.getMessage().getBytes(messageStorageCharset.name());
      } catch (UnsupportedEncodingException e) {
        throw UncheckedException.throwAsUncheckedException(e);
      }
      output.writeInt(bytes.length);
      output.writeBytes(bytes);
    }