@Test
public void handleJmsConnect() 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.JmsConnect(origin.ref()), getRef());
        final ClientConnected connected = expectMsgClass(ClientConnected.class);
        assertThat(connected.getOrigin()).contains(origin.ref());
        verify(mockConnection).start();
        verify(mockSession, times(connection.getSources()
                .stream()
                .mapToInt(s -> s.getAddresses().size() * s.getConsumerCount())
                .sum())).createConsumer(any());
    }};
}