@Subscribe
  public void testResultsAvailable(IndividualTestEvent.Finished event) {
    ImmutableList.Builder<String> builder = ImmutableList.builder();
    testFormatter.reportResult(builder, event.getResults());

    // We could just format as if this was a log entry, but doing so causes the console to flicker
    // obscenely and isn't conducive to running tests. Since this is the last step of the build, the
    // output will still render just fine if we write directly to stderr.
    console.getStdErr().println(Joiner.on('\n').join(builder.build()));
  }
 @Subscribe
 public void testRunComplete(TestRunEvent.Finished event) {
   ImmutableList.Builder<String> builder = ImmutableList.builder();
   testFormatter.runComplete(builder, event.getResults());
   console.getStdErr().println(Joiner.on('\n').join(builder.build()));
 }
 @Subscribe
 public void testRunStarted(TestRunEvent.Started event) {
   ImmutableList.Builder<String> builder = ImmutableList.builder();
   testFormatter.runStarted(builder, event.isRunAllTests(), event.getTargetNames());
   logEvents.add(LogEvent.info(Joiner.on('\n').join(builder.build())));
 }