Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/org/apache/poi/TnefParserTest.java
package org.apache.poi;

import com.github.jjYBdx4IL.utils.env.Maven;
import org.apache.poi.hmef.extractor.HMEFContentsExtractor;
import org.junit.Test;

import java.io.File;
import java.io.IOException;

public class TnefParserTest {

    private static final File TEMP_DIR = Maven.getTempTestDir(TnefParserTest.class);
    
    @Test
    public void test() throws IOException {
        HMEFContentsExtractor ext = new HMEFContentsExtractor(new File("src/test/resources/winmail.dat"));
        
        File rtf = new File(TEMP_DIR, "message.rtf");
           
        System.out.println("Extracting...");
        ext.extractMessageBody(rtf);
        ext.extractAttachments(TEMP_DIR);
        System.out.println("Extraction completed");
    }
}
-------------------------------------------------------------------------------
Test set: org.apache.poi.TnefParserTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 s - in org.apache.poi.TnefParserTest
test  Time elapsed: 0.027 s