<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 xml:lang="en" id="ac83160c-4dd9-43b1-94b2-dd5180ee435b" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" xmlns="jabber:client"/>
</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 xml:lang="en" id="ac83160c-4dd9-43b1-94b2-dd5180ee435b" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" xmlns="jabber:client"/>
</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 type="result" id="bind1" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"><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="rem-sub-rec-1">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq type="result" id="rem-sub-rec-1" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item subscription="both" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="set" id="tig3" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item subscription="both" name="dynrost" jid="dynrost@test-d"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence type="available" id="rem-sub-rec-2"/>
</OUTPUT>
<INPUT test='Subscription receive'>
<presence type="available" id="rem-sub-rec-2" to="all-xmpp-test@test-d" from="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"/>
</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" id="763b187f-09af-4e04-ad1f-70cdb1a91203" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" xmlns="jabber:client"/>
</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 xml:lang="en" id="763b187f-09af-4e04-ad1f-70cdb1a91203" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" xmlns="jabber:client"/>
</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 type="result" id="bind1" to="admin@test-d/def-user-resource" xmlns="jabber:client"><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="rem-sub-send-1">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="result" id="rem-sub-send-1" to="admin@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item subscription="both" name="all-xmpp-test" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq type="set" id="tig3" to="admin@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item subscription="both" name="dynrost" jid="dynrost@test-d"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence type="available" id="rem-sub-send-2"/>
</OUTPUT>
<INPUT test='Subscription send'>
<presence type="available" id="rem-sub-send-2" to="admin@test-d" from="admin@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence type="available" id="rem-sub-send-2" to="all-xmpp-test@test-d" from="admin@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription send'>
<presence type="available" id="rem-sub-rec-2" to="admin@test-d" from="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="set" id="rem-sub-send-3">
<query xmlns="jabber:iq:roster">
<item subscription="remove" jid="all-xmpp-test@test-d"/>
</query>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<presence type="unavailable" to="all-xmpp-test@test-d" from="admin@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription send'>
<iq type="set" id="rsttig4" to="admin@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster" ver="69a5ce2b3aad873f5d937fc8a0cf5d0e"><item subscription="remove" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence type="unsubscribe" to="all-xmpp-test@test-d" from="admin@test-d" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="set" id="rsttig4" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster" ver="896d7f80e9cb07ce7b5d22618e1577a7"><item subscription="to" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence type="unsubscribed" to="all-xmpp-test@test-d" from="admin@test-d" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="set" id="rsttig5" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster" ver="896d7f80e9cb07ce7b5d22618e1577a7"><item subscription="none" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="set" id="rem-sub-rec-3">
<query xmlns="jabber:iq:roster">
<item subscription="remove" jid="admin@test-d"/>
</query>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq type="set" id="rsttig6" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster" ver="896d7f80e9cb07ce7b5d22618e1577a7"><item subscription="remove" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq type="result" id="rem-sub-send-3" to="admin@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="get" id="rem-sub-send-4">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="result" id="rem-sub-send-4" to="admin@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="result" id="rem-sub-rec-3" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="get" id="rem-sub-rec-4">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq type="result" id="rem-sub-rec-4" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq type="set" id="tig5" to="admin@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item subscription="both" name="dynrost" jid="dynrost@test-d"><group>test group</group></item></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="set" id="tig7" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item subscription="both" name="dynrost" jid="dynrost@test-d"><group>test group</group></item></query></iq>
</INPUT>

</test-history>