@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));
    }
Tests for the TNEF (winmail.dat) parser
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/test/java/org/apache/tika/parser/microsoft/TNEFParserTest.java