WilmaHttpRequestProcessor { public void processRequest(final WilmaHttpEntity entity) throws ApplicationException { WilmaHttpRequest request = (WilmaHttpRequest) entity; for (ProcessorBase processor : processors) { if (processor.isEnabled()) { processor.process(request); } } }  void processRequest(final WilmaHttpEntity entity); void disableProcessor(final ProcessorBase processor); void enableProcessor(final ProcessorBase processor); boolean isProcessorEnabled(final ProcessorBase processor); void addProcessor(final ProcessorBase processor); boolean containsProcessor(final WilmaEntityProcessorInterface processor); void setProcessors(final List<ProcessorBase> processors);  }
@Test public void testProcessRequestShouldHandleRequest() throws ApplicationException { given(requestProcessor.isEnabled()).willReturn(true); underTest.processRequest(request); verify(requestProcessor).process(request); }