async def METHOD_NAME(event_loop):
    ws = WebsocketMock([
        {'request-id': 1},
        {'request-id': 3},
        {'request-id': 2},
    ])
    expected_responses = [
        {'request-id': 1},
        {'request-id': 2},
        {'request-id': 3},
    ]
    minimal_facades = [{'name': 'Pinger', 'versions': [1]}]
    con = None
    try:
        with \
                mock.patch('websockets.connect', mock.AsyncMock(return_value=ws)), \
                mock.patch(
                    'juju.client.connection.Connection.login',
                    mock.AsyncMock(return_value={'response': {
                        'facades': minimal_facades,
                        'server-version': '3.0',
                    }}),
                ), \
                mock.patch('juju.client.connection.Connection._get_ssl'), \
                mock.patch('juju.client.connection.Connection._pinger', mock.AsyncMock()):
            con = await Connection.connect('0.1.2.3:999')
        actual_responses = []
        for i in range(3):
            actual_responses.append(await con.rpc({'version': 1}))
        assert actual_responses == expected_responses
    finally:
        if con:
            await con.close()