@Test
public void handleJmsDisconnect() throws JMSException {

    new TestKit(actorSystem) {{
        final Props props = JMSConnectionHandlingActor.props(connection, e -> {}, jmsConnectionFactory);
        final ActorRef connectionHandlingActor = watch(actorSystem.actorOf(props));
        final TestProbe origin = TestProbe.apply(actorSystem);
        connectionHandlingActor.tell(new AmqpClientActor.JmsDisconnect(origin.ref(), mockConnection), getRef());
        final ClientDisconnected disconnected = expectMsgClass(ClientDisconnected.class);
        assertThat(disconnected.getOrigin()).contains(origin.ref());
        verify(mockConnection).close();
    }};
}