@Test
public void testAreaExtraction() throws Exception {

    final String test = "<html><head><title>Title</title>" +
            "<base href=\"http://domain.com\" />" +
            "</head><body><p><map name=\"map\" id=\"map\">" +
            "<area shape=\"rect\" href=\"map.html\" alt=\"\" />" +
            "</map></p></body></html>";
    StringWriter sw = new StringWriter();
    new HtmlParser().parse(
            new ByteArrayInputStream(test.getBytes(UTF_8)),
            makeHtmlTransformer(sw), new Metadata(), new ParseContext());
    String result = sw.toString();
    // <map> tag should exist, with <area> tag with fully resolved URL
    assertTrue(Pattern.matches("(?s).*<map .*<area .* href=\"http://domain.com/map.html\".*</map>.*$", result));
}