private RunResult buildRunResultWithOutput(RunResult result, Path outputDir, Path outputPath)
            throws IOException {
        copyToPath(outputDir, outputPath);
        return result;
    }
This method returns PreviewResult.

@return PreviewResult returns the result by PreviewExecutor
@throws IOException in case of failures in file operations
embulk-junit4/src/main/java/org/embulk/test/TestingEmbulk.java