@Test
public void testMetadata() throws Exception {

    TikaInputStream stream = getTestFile(file);
    Metadata metadata = new Metadata();
    ContentHandler handler = new BodyContentHandler();
    TNEFParser tnef = new TNEFParser();
    tnef.parse(stream, handler, metadata, new ParseContext());
    assertEquals("This is a test message", metadata.get(TikaCoreProperties.TITLE));
    assertEquals("This is a test message", metadata.get(TikaCoreProperties.SUBJECT));
}