private void copyToPath(Path outputDir, Path outputPath)
            throws IOException {
        try (OutputStream out = Files.newOutputStream(outputPath)) {
            List<Path> fragments = new ArrayList<Path>();
            try (DirectoryStream<Path> stream = Files.newDirectoryStream(outputDir, "fragments_*.csv")) {
                for (Path fragment : stream) {
                    fragments.add(fragment);
                }
            }
            Collections.sort(fragments);
            for (Path fragment : fragments) {
                try (InputStream in = Files.newInputStream(fragment)) {
                    copyStream(in, out);
                }
            }
        }
    }
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