private void compareFiles(final Path expectedFile, final Path actualFile, final List<Exception> exceptions) {
        try {
            boolean areFilesTheSame = !DiffUtil.unifiedDiff(
                    expectedFile, actualFile, true, 3);
            if (areFilesTheSame) {
                Files.deleteIfExists(actualFile);
            } else {
                LOGGER.error("Differences exist between the expected and actual output");
                LOGGER.info("\nvimdiff {} {}", expectedFile, actualFile);
                LOGGER.info("If you are satisfied the actual output is correct then copy " +
                        "the actual over the expected and re-run.");
                throw new RuntimeException(LogUtil.message("Files are not the same:\n{}\n{}",
                        FileUtil.getCanonicalPath(actualFile),
                        FileUtil.getCanonicalPath(expectedFile)));
            }
        } catch (final IOException | RuntimeException e) {
            exceptions.add(e);
        }
    }
Gets the next task to be processed.

@return The next task or null if there are currently no more tasks.
stroom-app/src/test/java/stroom/pipeline/task/TranslationTest.java