<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="25b3d33a-ed0d-4232-b8a1-e421c286e072" 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="25b3d33a-ed0d-4232-b8a1-e421c286e072" 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 to="all-xmpp-test@test-d/def-user-resource" id="bind1" type="result" 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 id="rem-sub-rec-1" type="get">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="rem-sub-rec-1" type="result" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item name="admin" subscription="both" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="tig3" type="set" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item name="dynrost" subscription="both" jid="dynrost@test-d"><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 to="all-xmpp-test@test-d" id="rem-sub-rec-2" type="available" 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="db3ee59c-3dc6-4901-838c-f7235f10f386" 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="db3ee59c-3dc6-4901-838c-f7235f10f386" 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 to="admin@test-d/def-user-resource" id="bind1" type="result" 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 id="rem-sub-send-1" type="get">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="rem-sub-send-1" type="result" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item name="all-xmpp-test" subscription="both" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="tig3" type="set" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item name="dynrost" subscription="both" jid="dynrost@test-d"><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 to="admin@test-d" id="rem-sub-send-2" type="available" from="admin@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" id="rem-sub-send-2" type="available" from="admin@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription send'>
<presence to="admin@test-d" id="rem-sub-rec-2" type="available" from="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="rem-sub-send-3" type="set">
<query xmlns="jabber:iq:roster">
<item subscription="remove" jid="all-xmpp-test@test-d"/>
</query>
</iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="rsttig4" type="set" xmlns="jabber:client"><query ver="b83923cf980f93a17e1a9e9240268183" xmlns="jabber:iq:roster"><item subscription="remove" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" type="unavailable" from="admin@test-d/def-user-resource" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" type="unsubscribe" from="admin@test-d" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="rsttig4" type="set" xmlns="jabber:client"><query ver="b8c4b37de9370f4d095b196b5756e2a4" xmlns="jabber:iq:roster"><item name="admin" subscription="to" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" type="unsubscribed" from="admin@test-d" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="rsttig5" type="set" xmlns="jabber:client"><query ver="b8c4b37de9370f4d095b196b5756e2a4" xmlns="jabber:iq:roster"><item name="admin" subscription="none" jid="admin@test-d"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq id="rem-sub-rec-3" type="set">
<query xmlns="jabber:iq:roster">
<item subscription="remove" jid="admin@test-d"/>
</query>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="rsttig6" type="set" xmlns="jabber:client"><query ver="b8c4b37de9370f4d095b196b5756e2a4" xmlns="jabber:iq:roster"><item subscription="remove" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="rem-sub-send-3" type="result" xmlns="jabber:client"/>
</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 to="admin@test-d/def-user-resource" id="rem-sub-send-4" type="result" xmlns="jabber:client"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="rem-sub-rec-3" type="result" xmlns="jabber:client"/>
</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 to="all-xmpp-test@test-d/def-user-resource" id="rem-sub-rec-4" type="result" xmlns="jabber:client"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="tig5" type="set" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item name="dynrost" subscription="both" jid="dynrost@test-d"><group>test group</group></item></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="tig7" type="set" xmlns="jabber:client"><query xmlns="jabber:iq:roster"><item name="dynrost" subscription="both" jid="dynrost@test-d"><group>test group</group></item></query></iq>
</INPUT>

</test-history>