final ExtractionContext extractionContext = new ExtractionContext(
extractor.getDescription().getExtractorName(),
RDFUtils.uri("file://" + resource)
);
final InputStream is = this.getClass().getResourceAsStream(resource);
final CompositeTripleHandler compositeTripleHandler = new CompositeTripleHandler();
final TripleHandler verifierTripleHandler = Mockito.mock(TripleHandler.class);
compositeTripleHandler.addChild(verifierTripleHandler);
final CountingTripleHandler countingTripleHandler = new CountingTripleHandler();
compositeTripleHandler.addChild(countingTripleHandler);
final ByteArrayOutputStream out = new ByteArrayOutputStream();
compositeTripleHandler.addChild( new NTriplesWriter(out) );
final ExtractionResult extractionResult = new ExtractionResultImpl(
extractionContext, extractor, compositeTripleHandler
);
extractor.run(extractionParameters, extractionContext, is, extractionResult);
compositeTripleHandler.close();
logger.info(out.toString());
verifyPredicateOccurrence(verifierTripleHandler, Excel.getInstance().containsSheet, 2 );
verifyPredicateOccurrence(verifierTripleHandler, Excel.getInstance().containsRow , 6 );
verifyPredicateOccurrence(verifierTripleHandler, Excel.getInstance().containsCell , 18);