<test-history test='Presence 5 (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:stream="http://etherx.jabber.org/streams" id="770ea691-0875-4673-a7b2-a50d3adda675" xmlns="jabber:client" from="test-d" version="1.0" xml:lang="en"/>
</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 xmlns:stream="http://etherx.jabber.org/streams" id="770ea691-0875-4673-a7b2-a50d3adda675" xmlns="jabber:client" from="test-d" version="1.0" xml:lang="en"/>
</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 id="bind1" xmlns="jabber:client" type="result" 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 id="rem-sub-rec-1" type="get">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq id="rem-sub-rec-1" xmlns="jabber:client" type="result" to="all-xmpp-test@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item name="admin" jid="admin@test-d" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq id="tig1" xmlns="jabber:client" type="set" to="all-xmpp-test@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item name="dynrost" jid="dynrost@test-d" subscription="both"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence id="rem-sub-rec-2" type="available"/>
</OUTPUT>
<INPUT test='Subscription receive'>
<presence id="rem-sub-rec-2" xmlns="jabber:client" from="all-xmpp-test@test-d/def-user-resource" type="available" to="all-xmpp-test@test-d"/>
</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:stream="http://etherx.jabber.org/streams" id="6baf379b-e8f0-4519-97a0-74c561b3cc7c" xmlns="jabber:client" from="test-d" version="1.0" xml:lang="en"/>
</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 xmlns:stream="http://etherx.jabber.org/streams" id="6baf379b-e8f0-4519-97a0-74c561b3cc7c" xmlns="jabber:client" from="test-d" version="1.0" xml:lang="en"/>
</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 id="bind1" xmlns="jabber:client" type="result" 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 id="rem-sub-send-1" type="get">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq id="rem-sub-send-1" xmlns="jabber:client" type="result" to="admin@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item name="all-xmpp-test" jid="all-xmpp-test@test-d" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq id="tig1" xmlns="jabber:client" type="set" to="admin@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item name="dynrost" jid="dynrost@test-d" subscription="both"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence id="rem-sub-send-2" type="available"/>
</OUTPUT>
<INPUT test='Subscription send'>
<presence id="rem-sub-send-2" xmlns="jabber:client" from="admin@test-d/def-user-resource" type="available" to="admin@test-d"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence id="rem-sub-send-2" xmlns="jabber:client" from="admin@test-d/def-user-resource" type="available" to="all-xmpp-test@test-d"/>
</INPUT>
<INPUT test='Subscription send'>
<presence id="rem-sub-rec-2" xmlns="jabber:client" from="all-xmpp-test@test-d/def-user-resource" type="available" to="admin@test-d"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="rem-sub-send-3" type="set">
<query xmlns="jabber:iq:roster">
<item jid="all-xmpp-test@test-d" subscription="remove"/>
</query>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq id="rsttig2" xmlns="jabber:client" type="set" to="admin@test-d/def-user-resource"><query ver="48e1250727ddf37f673e8748968b291c" xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" subscription="remove"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" from="admin@test-d/def-user-resource" type="unavailable" to="all-xmpp-test@test-d"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" from="admin@test-d" type="unsubscribe" to="all-xmpp-test@test-d"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq id="rsttig2" xmlns="jabber:client" type="set" to="all-xmpp-test@test-d/def-user-resource"><query ver="027d341eca4265d5130ce5f8e7426327" xmlns="jabber:iq:roster"><item name="admin" jid="admin@test-d" subscription="to"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" from="admin@test-d" type="unsubscribed" to="all-xmpp-test@test-d"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq id="rsttig3" xmlns="jabber:client" type="set" to="all-xmpp-test@test-d/def-user-resource"><query ver="027d341eca4265d5130ce5f8e7426327" xmlns="jabber:iq:roster"><item name="admin" jid="admin@test-d" subscription="none"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq id="rem-sub-rec-3" type="set">
<query xmlns="jabber:iq:roster">
<item jid="admin@test-d" subscription="remove"/>
</query>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq id="rsttig4" xmlns="jabber:client" type="set" to="all-xmpp-test@test-d/def-user-resource"><query ver="027d341eca4265d5130ce5f8e7426327" xmlns="jabber:iq:roster"><item jid="admin@test-d" subscription="remove"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq id="rem-sub-send-3" xmlns="jabber:client" type="result" to="admin@test-d/def-user-resource"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="rem-sub-send-4" type="get">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq id="rem-sub-send-4" xmlns="jabber:client" type="result" to="admin@test-d/def-user-resource"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq id="rem-sub-rec-3" xmlns="jabber:client" type="result" to="all-xmpp-test@test-d/def-user-resource"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq id="rem-sub-rec-4" type="get">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq id="rem-sub-rec-4" xmlns="jabber:client" type="result" to="all-xmpp-test@test-d/def-user-resource"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq id="tig3" xmlns="jabber:client" type="set" to="admin@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item name="dynrost" jid="dynrost@test-d" subscription="both"><group>test group</group></item></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq id="tig5" xmlns="jabber:client" type="set" to="all-xmpp-test@test-d/def-user-resource"><query xmlns="jabber:iq:roster"><item name="dynrost" jid="dynrost@test-d" subscription="both"><group>test group</group></item></query></iq>
</INPUT>

</test-history>