public class ExtractionExceptionTest {
@Test
public void testPrintStackTrace() throws ExtractionException, IOException {
final String FAKE_EXTRACTOR_NAME = "fake-extractor-name";
final Extractor extractor = mock(Extractor.class);
final ExtractorDescription ed = mock(ExtractorDescription.class);
when(ed.getExtractorName()).thenReturn(FAKE_EXTRACTOR_NAME);
when(extractor.getDescription()).thenReturn(ed);
final TripleHandler th = mock(TripleHandler.class);
final ExtractionContext extractionContext = new ExtractionContext(
extractor.getDescription().getExtractorName(),
new URIImpl("http://fake.document.uri")
);
final ExtractionResult er = new ExtractionResultImpl(extractionContext, extractor, th);
er.notifyIssue(IssueReport.IssueLevel.Fatal , "Fake fatal error.", 1, 2);
er.notifyIssue(IssueReport.IssueLevel.Error , "Fake error." , 3, 4);