@Test
public void testEmptyText() throws Exception {

    ContentHandler handler = new BodyContentHandler();
    Metadata metadata = new Metadata();
    parser.parse(
            new ByteArrayInputStream(new byte[0]), handler, metadata, new ParseContext());
    assertEquals("text/plain; charset=UTF-8", metadata.get(Metadata.CONTENT_TYPE));
    assertEquals("\n", handler.toString());
}