### Question:
DocumentIndexingPipeline implements DocumentFilteringPipeline { @Override public void process(DocumentIndexingPackage dip) throws IndexingException { for (IndexDocumentFilter filter : filters) { log.info("filter {} executed on pid {}", filter.getClass().getName(), dip.getPid()); filter.filter(dip); } }  @Override void process(DocumentIndexingPackage dip); @Override void setFilters(List<IndexDocumentFilter> filters);  }### Answer:
@Test public void testProcessFilters() throws Exception { pipeline.process(dip); verify(mockFilter1).filter(dip); verify(mockFilter2).filter(dip); }
@Test(expected = IndexingException.class) public void testProcessIndexingException() throws Exception { doThrow(new IndexingException("")).when(mockFilter2).filter(dip); pipeline.process(dip); }