ReportService { public void reportTraceToPath(final Trace trace, final Path outputPath, final String outputFormat) { try (OutputStream outputStream = Files.newOutputStream(outputPath)) { reportTraceToStream(trace, outputStream, outputFormat); } catch (final IOException e) { throw new ReportException("Error generating stream to output path " + outputPath, e); } } ReportService(ReporterFactoryLoader reporterFactoryLoader); void reportTraceToPath(final Trace trace, final Path outputPath,
            final String outputFormat); void reportTraceToStdOut(final Trace trace, final String outputFormat);  }
@Test void testReportTraceToPath(@TempDir Path tempDir) { service.reportTraceToPath(traceMock, tempDir.resolve("output"), OUTPUT_FORMAT); verify(reportableMock).renderToStream(any()); }