assertStringEquals("extracted text", "Hello World ", visitor.getExtractedText());
}
public void testVisitHtmlWithPreTags() throws Exception {
createParser("Some text with <pre>this should be preserved</pre>");
TextExtractingVisitor visitor = new TextExtractingVisitor();
parser.visitAllNodesWith(visitor);
assertStringEquals("extracted text", "Some text with this should be preserved", visitor
.getExtractedText());
}