private static boolean doCompareReaders(final Reader reader1, final Reader reader2, final boolean ignoreWhitespace,
                                            final boolean xml) {
        try {
            // Comparing XML is more expensive so disable it for now as tests
            // pass without comparing as XML.
            if (!compare(reader1, reader2, ignoreWhitespace)) {
                return false;
            }
        } catch (final IOException e) {
            fail(e.getMessage());
        } finally {
            if (reader1 != null) {
                try {
                    reader1.close();
                } catch (final IOException e) {
                    // Swallow as trying to ensure it is closed.
                }
            }
            if (reader2 != null) {
                try {
                    reader2.close();
                } catch (final IOException e) {
                    // Swallow as trying to ensure it is closed.
                }
            }
        }

        return true;
    }
Generate a unified diff of the two files using the specified number of lines of context.
The diff output is sent to system out in coloured form.

@return True if the files are the same
stroom-test-common/src/main/java/stroom/test/common/ComparisonHelper.java