@Test
public void shouldCloseAllConnectionsOnBrokerFailure() {

    // Arrange
    final ProtocolResponseMessage responseMessage = this.createDefaultResponseMessage();
    doThrow(IllegalStateException.class).when(this.jmsTemplate).send(any(MessageCreator.class));
    // Act
    assertThatExceptionOfType(IllegalStateException.class).isThrownBy(() -> {
        this.messageSender.send(responseMessage);
    });
    // Assert
    verify(this.clientConnectionService).closeAllConnections();
}