@Test
public void testBoilerplateWithMarkup() throws Exception {

    String path = "/test-documents/boilerplate.html";
    Metadata metadata = new Metadata();
    StringWriter sw = new StringWriter();
    ContentHandler ch = makeHtmlTransformer(sw);
    BoilerpipeContentHandler bpch = new BoilerpipeContentHandler(ch);
    bpch.setIncludeMarkup(true);
    new HtmlParser().parse(
            HtmlParserTest.class.getResourceAsStream(path),
            bpch, metadata, new ParseContext());
    String content = sw.toString();
    assertTrue("Has empty table elements", content.contains("<body><table><tr><td><table><tr><td>"));
    assertTrue("Has empty a element", content.contains("<a shape=\"rect\" href=\"Main.php\"/>"));
    assertTrue("Has real content", content.contains("<p>This is the real meat"));
    assertTrue("Ends with appropriate HTML", content.endsWith("</p></body></html>"));
    assertFalse(content.contains("boilerplate"));
    assertFalse(content.contains("footer"));
}