WilmaHttpResponseProcessor { public synchronized void processResponse(final WilmaHttpResponse response) throws ApplicationException { for (ProcessorBase processor : processors) { if (processor.isEnabled()) { processor.process(response); } } }  synchronized void processResponse(final WilmaHttpResponse response); 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 testProcessResponse() throws ApplicationException { given(responseProcessor.isEnabled()).willReturn(true); underTest.processResponse(response); verify(responseProcessor).process(response); }