<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" xmlns="jabber:client" from="test-d" id="74a14fe4-16ea-4d60-be2c-f1168c5f5d5c" xml:lang="en" version="1.0"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression></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" xmlns="jabber:client" from="test-d" id="74a14fe4-16ea-4d60-be2c-f1168c5f5d5c" xml:lang="en" version="1.0"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><register xmlns="http://jabber.org/features/iq-register"/><csi xmlns="urn:xmpp:csi:0"/><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></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" xmlns="jabber:client" type="result" id="bind1"><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 to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="result" id="rem-sub-rec-1"><query xmlns="jabber:iq:roster"><item subscription="both" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set" id="tig3"><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 id="rem-sub-rec-2" type="available"/>
</OUTPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" xmlns="jabber:client" from="all-xmpp-test@test-d/def-user-resource" type="available" id="rem-sub-rec-2"/>
</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" xmlns="jabber:client" from="test-d" id="ff43ac11-0058-45e3-a1b1-aeaf1a64ef84" xml:lang="en" version="1.0"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression></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" xmlns="jabber:client" from="test-d" id="ff43ac11-0058-45e3-a1b1-aeaf1a64ef84" xml:lang="en" version="1.0"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><register xmlns="http://jabber.org/features/iq-register"/><csi xmlns="urn:xmpp:csi:0"/><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></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" xmlns="jabber:client" type="result" id="bind1"><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 to="admin@test-d/def-user-resource" xmlns="jabber:client" type="result" id="rem-sub-send-1"><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 to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set" id="tig3"><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 id="rem-sub-send-2" type="available"/>
</OUTPUT>
<INPUT test='Subscription send'>
<presence to="admin@test-d" xmlns="jabber:client" from="admin@test-d/def-user-resource" type="available" id="rem-sub-send-2"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" xmlns="jabber:client" from="admin@test-d/def-user-resource" type="available" id="rem-sub-send-2"/>
</INPUT>
<INPUT test='Subscription send'>
<presence to="admin@test-d" xmlns="jabber:client" from="all-xmpp-test@test-d/def-user-resource" type="available" id="rem-sub-rec-2"/>
</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 send'>
<iq to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set" id="rsttig4"><query xmlns="jabber:iq:roster" ver="48e1250727ddf37f673e8748968b291c"><item subscription="remove" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" xmlns="jabber:client" type="result" id="rem-sub-send-3"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="get" id="rem-sub-send-4">
<query xmlns="jabber:iq:roster"/>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" xmlns="jabber:client" from="admin@test-d/def-user-resource" type="unavailable"/>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" xmlns="jabber:client" type="result" id="rem-sub-send-4"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set" id="tig5"><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'>
<presence to="all-xmpp-test@test-d" xmlns="jabber:client" from="admin@test-d" type="unsubscribe"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set" id="rsttig4"><query xmlns="jabber:iq:roster" ver="027d341eca4265d5130ce5f8e7426327"><item subscription="to" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" xmlns="jabber:client" from="admin@test-d" type="unsubscribed"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set" id="rsttig5"><query xmlns="jabber:iq:roster" ver="027d341eca4265d5130ce5f8e7426327"><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 to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set" id="rsttig6"><query xmlns="jabber:iq:roster" ver="027d341eca4265d5130ce5f8e7426327"><item subscription="remove" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="result" id="rem-sub-rec-3"/>
</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 to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="result" id="rem-sub-rec-4"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set" id="tig7"><query xmlns="jabber:iq:roster"><item subscription="both" name="dynrost" jid="dynrost@test-d"><group>test group</group></item></query></iq>
</INPUT>

</test-history>