@Test
public void testSomeMissingHeaders() throws Exception {

    Metadata metadata = new Metadata();
    InputStream stream = getStream("test-documents/testRFC822-limitedheaders");
    ContentHandler handler = new BodyContentHandler();
    ParseContext context = new ParseContext();
    context.set(Parser.class, EXTRACT_ALL_ALTERNATIVES_PARSER);
    EXTRACT_ALL_ALTERNATIVES_PARSER.parse(stream, handler, metadata, context);
    assertEquals(true, metadata.isMultiValued(TikaCoreProperties.CREATOR));
    assertEquals("xyz", metadata.getValues(TikaCoreProperties.CREATOR)[0]);
    assertEquals("abc", metadata.getValues(TikaCoreProperties.CREATOR)[1]);
    assertEquals(true, metadata.isMultiValued(Metadata.MESSAGE_FROM));
    assertEquals("xyz", metadata.getValues(Metadata.MESSAGE_FROM)[0]);
    assertEquals("abc", metadata.getValues(Metadata.MESSAGE_FROM)[1]);
    assertEquals(true, metadata.isMultiValued(Metadata.MESSAGE_TO));
    assertEquals("abc", metadata.getValues(Metadata.MESSAGE_TO)[0]);
    assertEquals("def", metadata.getValues(Metadata.MESSAGE_TO)[1]);
    assertEquals("abcd", metadata.get(TikaCoreProperties.TITLE));
    assertEquals("abcd", metadata.get(TikaCoreProperties.SUBJECT));
    assertContains("bar biz bat", handler.toString());
}