@Test
public void manageConnection() {

    new TestKit(actorSystem) {{
        final TestProbe probe = TestProbe.apply(actorSystem);
        final ActorRef underTest = TestConstants.createConnectionSupervisorActor(
                connectionId, actorSystem, proxyActor,
                (connection, concierge, connectionActor) -> MockClientActor.props(probe.ref()),
                TestConstants.dummyDittoProtocolSub(pubSubMediator, dittoProtocolSubMock),
                pubSubMediator
        );
        watch(underTest);
        // create connection
        underTest.tell(createConnection, getRef());
        probe.expectMsg(openConnection);
        expectMsg(createConnectionResponse);
        expectRemoveSubscriber(1);
        expectSubscribe(TWIN_AND_LIVE_EVENTS, SUBJECTS);
        // close connection
        underTest.tell(closeConnection, getRef());
        probe.expectMsg(closeConnection);
        expectMsg(closeConnectionResponse);
        expectRemoveSubscriber(2);
        // delete connection
        underTest.tell(deleteConnection, getRef());
        expectMsg(deleteConnectionResponse);
        probe.expectNoMessage();
        expectTerminated(underTest);
    }};
}