if (!source.getProblems().isEmpty()) {
fail(source.getProblems().get(0).toString());
}
Node node = source.getNodes().get(0);
TextFormatter formatter = new TextFormatter();
node.accept(new SourcePrinter(formatter));
String actual = fixLineEndings(formatter.finish());
String original = fixLineEndings(source.getRawInput());
try {
assertEquals(original, actual);
} catch (AssertionError e) {
System.out.println("------------------RAW:");