<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 xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="test-d" id="10f5c3e8-e428-4edf-b9b4-fff0e7dbdf33" version="1.0"/>
</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"/><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 xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="test-d" id="10f5c3e8-e428-4edf-b9b4-fff0e7dbdf33" version="1.0"/>
</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"/><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" to="all-xmpp-test@test-d/def-user-resource" id="bind1" type="result"><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 id="roster_22" type="get">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" id="roster_22" type="result"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" subscription="both" name="admin"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" id="tig1" type="set"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" subscription="both" name="dynrost"><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 xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="test-d" id="8382792a-2ed6-44da-b86c-b5bc1a3e4ad8" version="1.0"/>
</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"/><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 xml:lang="en" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="test-d" id="8382792a-2ed6-44da-b86c-b5bc1a3e4ad8" version="1.0"/>
</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"/><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" to="admin@test-d/def-user-resource" id="bind1" type="result"><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 id="roster_22" type="get">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" to="admin@test-d/def-user-resource" id="roster_22" type="result"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" subscription="both" name="all-xmpp-test"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" to="admin@test-d/def-user-resource" id="tig1" type="set"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" subscription="both" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" id="1" type="unsubscribed"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" to="admin@test-d/def-user-resource" id="rsttig2" type="set"><query xmlns="jabber:iq:roster" ver="e63c5dfe75ec696a9d5a3e3a53fecba4"><item jid="all-xmpp-test@test-d" subscription="to" name="all-xmpp-test"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" to="all-xmpp-test@test-d" from="admin@test-d" id="1" type="unsubscribed"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" id="rsttig2" type="set"><query xmlns="jabber:iq:roster" ver="7aec22d9b0296f8e5b2d8ea2136b2a69"><item jid="admin@test-d" subscription="from" name="admin"/></query></iq>
</INPUT>

</test-history>