JmsIndexDeletionProcessor { public void process(final String fileName) { IndexMessage message = indexMessageFactory.createIndexMessage(fileName, IndexingType.DELETE.getName()); messageIndexer.sendMessageToIndexer(message); }  void process(final String fileName);  }
@Test public void testIndexMessageShouldSendMessage() { given(indexMessageFactory.createIndexMessage(FILE_NAME, IndexingType.DELETE.getName())).willReturn(message); underTest.process(FILE_NAME); verify(messageIndexer).sendMessageToIndexer(message); }