private static boolean diff(final String file1Path,
                                final String file2Path,
                                final String string1,
                                final String string2,
                                final boolean colouredOutput,
                                final int contextLines,
                                final Consumer<List<String>> diffLinesConsumer) {

        final List<String> lines1 = string1.lines()
                .collect(Collectors.toList());
        final List<String> lines2 = string2.lines()
                .collect(Collectors.toList());

        final Patch<String> patch = DiffUtils.diff(lines1, lines2);

        final List<String> unifiedDiff = DiffUtils.generateUnifiedDiff(
                file1Path,
                file2Path,
                lines1,
                patch,
                contextLines);

        if (!unifiedDiff.isEmpty() && diffLinesConsumer != null) {
            if (colouredOutput) {
                final List<String> colouredLines = unifiedDiff.stream()
                        .map(diffLine -> {

                            final ConsoleColour lineColour;
                            if (diffLine.startsWith("+")) {
                                lineColour = ConsoleColour.GREEN;
                            } else if (diffLine.startsWith("-")) {
                                lineColour = ConsoleColour.RED;
                            } else {
                                lineColour = ConsoleColour.NO_COLOUR;
                            }
                            return ConsoleColour.colourise(diffLine, lineColour);
                        })
                        .collect(Collectors.toList());

                diffLinesConsumer.accept(colouredLines);
            } else {
                diffLinesConsumer.accept(unifiedDiff);
            }
        }
        return !unifiedDiff.isEmpty();
    }
@param originalContent   The original text to diff
@param revisedContent    The revised test to diff
@param colouredOutput    True if you want ascii colour codes in the output
@param contextLines      Number of lines of context before and after each difference
@param diffLinesConsumer A consumer of the diff output lines
@return True if any differences exist
stroom-util/src/main/java/stroom/util/io/DiffUtil.java