@Test public void testSendMessageToIndexerShouldSendMessage() { given(messageCreatorFactory.createJmsMessageCreator(message)).willReturn(messageCreator); underTest.sendMessageToIndexer(message); verify(jmsTemplateForIndexing).send(messageCreator); }
public void sendMessageToIndexer(final IndexMessage message) { try { jmsTemplateForIndexing.send(messageCreatorFactory.createJmsMessageCreator(message)); turnOnConnectionErrorLog(); } catch (Exception e) { turnOffConnectionErrorLog(e); } }
JmsMessageIndexer { public void sendMessageToIndexer(final IndexMessage message) { try { jmsTemplateForIndexing.send(messageCreatorFactory.createJmsMessageCreator(message)); turnOnConnectionErrorLog(); } catch (Exception e) { turnOffConnectionErrorLog(e); } } }
JmsMessageIndexer { public void sendMessageToIndexer(final IndexMessage message) { try { jmsTemplateForIndexing.send(messageCreatorFactory.createJmsMessageCreator(message)); turnOnConnectionErrorLog(); } catch (Exception e) { turnOffConnectionErrorLog(e); } }  }
JmsMessageIndexer { public void sendMessageToIndexer(final IndexMessage message) { try { jmsTemplateForIndexing.send(messageCreatorFactory.createJmsMessageCreator(message)); turnOnConnectionErrorLog(); } catch (Exception e) { turnOffConnectionErrorLog(e); } }  void sendMessageToIndexer(final IndexMessage message); }
JmsMessageIndexer { public void sendMessageToIndexer(final IndexMessage message) { try { jmsTemplateForIndexing.send(messageCreatorFactory.createJmsMessageCreator(message)); turnOnConnectionErrorLog(); } catch (Exception e) { turnOffConnectionErrorLog(e); } }  void sendMessageToIndexer(final IndexMessage message);  }