JmsResponseIndexingProcessor { public void process(final WilmaHttpResponse response) { String fileName = fileNameProvider.getFileName(response); IndexMessage message = indexMessageFactory.createIndexMessage(fileName, IndexingType.ADD.getName()); messageIndexer.sendMessageToIndexer(message); }  void process(final WilmaHttpResponse response);  }
@Test public void testProcessShouldCallIndexMessage() { given(fileNameProvider.getFileName(response)).willReturn(FILE_NAME); given(indexMessageFactory.createIndexMessage(FILE_NAME, IndexingType.ADD.getName())).willReturn(message); underTest.process(response); verify(messageIndexer).sendMessageToIndexer(message); }