@Test
public void testExceptionDuringJMSConnectionCreation() {

    new TestKit(actorSystem) {{
        final Props props =
                AmqpClientActor.propsForTests(connection, getRef(), getRef(),
                        (theConnection, exceptionListener) -> {
                            throw JMS_EXCEPTION;
                        });
        final ActorRef connectionActor = actorSystem.actorOf(props);
        connectionActor.tell(OpenConnection.of(CONNECTION_ID, DittoHeaders.empty()), getRef());
        expectMsg(new Status.Failure(SESSION_EXCEPTION));
    }};
}