@Test
public void testSendMessageToIndexerWhenCannotConnectShouldLogError() {

    //GIVEN
    Whitebox.setInternalState(underTest, "logger", logger);
    given(messageCreatorFactory.createJmsMessageCreator(message)).willThrow(new RuntimeException());
    //WHEN
    underTest.sendMessageToIndexer(message);
    //THEN
    verify(logger).info(Mockito.anyString(), Mockito.any(Exception.class));
}