package com.workfusion.odf.impl.converter.extractor.mail;

import java.io.IOException;

import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class RecursiveEmlExtractorTest {
    @Test
    void recursiveExtractSuccessTest() throws IOException {
    	Logger logger = LoggerFactory.getLogger(RecursiveEmlExtractorTest.class);
        String name = "/mail/example.eml";
        byte[] bytes = IOUtils.resourceToByteArray(name);
        RecursiveEmlExtractor recursiveEmlExtractor = new RecursiveEmlExtractor(logger);
        recursiveEmlExtractor.recursiveExtract(bytes, FilenameUtils.getName(name));
    }
}
