@Test
public void testIgnoreCharsetDetectorLanguage() throws Exception {

    String test = "<html><title>Simple Content</title><body></body></html>";
    Metadata metadata = new Metadata();
    metadata.add(Metadata.CONTENT_LANGUAGE, "en");
    new HtmlParser().parse(
            new ByteArrayInputStream(test.getBytes(UTF_8)),
            new BodyContentHandler(), metadata, new ParseContext());
    assertEquals("en", metadata.get(Metadata.CONTENT_LANGUAGE));
}