@Test
public void testObjectExtraction() throws Exception {

    final String test = "<html><head><title>Title</title>" +
            "<base href=\"http://domain.com\" />" +
            "</head><body><p><object data=\"object.data\" type=\"text/html\">" +
            "<param name=\"name\" value=\"value\" />" +
            "</object></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();
    // <object> tag should exist with fully resolved URLs
    assertTrue(
            "<object> tag not correctly found in:\n" + result,
            Pattern.matches("(?s).*<object data=\"http://domain.com/object.data\".*<param .* name=\"name\" value=\"value\"/>.*</object>.*$", result)
    );
}