<test-history test='Presence 6 (c2s)'>
<OUTPUT test='Subscription receive'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'/>
</OUTPUT>
<INPUT test='Subscription receive'>
<stream:stream xmlns="jabber:client" id="347ac90f-4e2f-4819-8f8c-cb1e176f872f" version="1.0" xml:lang="en" from="test-d" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>
</INPUT>
<OUTPUT test='Subscription receive'>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsbC14bXBwLXRlc3QAYWxsLXhtcHAtdGVzdC1wYXNzd29yZA==</auth>
</OUTPUT>
<INPUT test='Subscription receive'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'>
</OUTPUT>
<INPUT test='Subscription receive'>
<stream:stream xmlns="jabber:client" id="347ac90f-4e2f-4819-8f8c-cb1e176f872f" version="1.0" xml:lang="en" from="test-d" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/><register xmlns="http://jabber.org/features/iq-register"/><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/></stream:features>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type='set' id='bind1'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>res-1</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" type="result" id="bind1" to="all-xmpp-test@test-d/res-1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>all-xmpp-test@test-d/res-1</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence id="pres-wait-1"/>
</OUTPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" id="pres-wait-1" to="all-xmpp-test@test-d" from="all-xmpp-test@test-d/res-1"/>
</INPUT>
<OUTPUT test='Subscription send'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'/>
</OUTPUT>
<INPUT test='Subscription send'>
<stream:stream xmlns="jabber:client" id="fbd1ae9b-fa13-4700-abd7-7d9dd697865d" version="1.0" xml:lang="en" from="test-d" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/></stream:features>
</INPUT>
<OUTPUT test='Subscription send'>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsbC14bXBwLXRlc3QAYWxsLXhtcHAtdGVzdC1wYXNzd29yZA==</auth>
</OUTPUT>
<INPUT test='Subscription send'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
</INPUT>
<OUTPUT test='Subscription send'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'>
</OUTPUT>
<INPUT test='Subscription send'>
<stream:stream xmlns="jabber:client" id="fbd1ae9b-fa13-4700-abd7-7d9dd697865d" version="1.0" xml:lang="en" from="test-d" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/><register xmlns="http://jabber.org/features/iq-register"/><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/></stream:features>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type='set' id='bind1'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>res-2</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" type="result" id="bind1" to="all-xmpp-test@test-d/res-2"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>all-xmpp-test@test-d/res-2</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence id="pres-wait-1"/>
</OUTPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" id="pres-wait-1" to="all-xmpp-test@test-d" from="all-xmpp-test@test-d/res-2"/>
</INPUT>
<INPUT test='Subscription send'>
<presence xmlns="jabber:client" id="pres-wait-1" to="all-xmpp-test@test-d" from="all-xmpp-test@test-d/res-1"/>
</INPUT>
<INPUT test='Subscription send'>
<presence xmlns="jabber:client" id="pres-wait-1" to="all-xmpp-test@test-d" from="all-xmpp-test@test-d/res-2"/>
</INPUT>
<INPUT test='Subscription send'>
<presence xmlns="jabber:client" type="unavailable" to="all-xmpp-test@test-d" from="all-xmpp-test@test-d/res-1"/>
</INPUT>

</test-history>