<test-history test='Presence 2 (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="5a2f8f4a-f81a-41ed-b6ac-5fb5a3b20bf8" xml:lang="en" version="1.0" 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="5a2f8f4a-f81a-41ed-b6ac-5fb5a3b20bf8" xml:lang="en" version="1.0" 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>def-user-resource</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" type="result" id="bind1" to="all-xmpp-test@test-d/def-user-resource"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>all-xmpp-test@test-d/def-user-resource</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="get" id="roster_22">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" type="result" id="roster_22" to="all-xmpp-test@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" name="admin" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" type="set" id="tig3" to="all-xmpp-test@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><group>test group</group></item></query></iq>
</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="8646e48f-fecc-4737-9268-fea33a670c10" xml:lang="en" version="1.0" 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'>AGFkbWluAHN0YXRz</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="8646e48f-fecc-4737-9268-fea33a670c10" xml:lang="en" version="1.0" 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>def-user-resource</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" type="result" id="bind1" to="admin@test-d/def-user-resource"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>admin@test-d/def-user-resource</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="get" id="roster_22">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" type="result" id="roster_22" to="admin@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" name="all-xmpp-test" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" type="set" id="tig3" to="admin@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence type="unsubscribed" id="pres-sub-cancel-send-1" to="all-xmpp-test@test-d"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" type="set" id="rsttig4" to="admin@test-d/def-user-resource"><query xmlns="jabber:iq:roster" ver="5336b4cf323a69c55e4c94d32a2a8d2c"><item jid="all-xmpp-test@test-d" name="all-xmpp-test" subscription="to"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" type="unsubscribed" id="pres-sub-cancel-send-1" to="all-xmpp-test@test-d" from="admin@test-d"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" type="set" id="rsttig4" to="all-xmpp-test@test-d/def-user-resource"><query xmlns="jabber:iq:roster" ver="adf83dcd982f1e824e832b6d1dcf47b7"><item jid="admin@test-d" name="admin" subscription="from"/></query></iq>
</INPUT>

</test-history>