<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="0d17bb9d-569b-4df0-848e-99391f59ffc0" xml:lang="en" version="1.0"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><auth xmlns="http://jabber.org/features/iq-auth"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-256</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><ver xmlns="urn:xmpp:features:rosterver"/><sub xmlns="urn:xmpp:features:pre-approval"/><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="0d17bb9d-569b-4df0-848e-99391f59ffc0" 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"/><sub xmlns="urn:xmpp:features:pre-approval"/><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"><optional/></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" 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="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" xmlns="jabber:client" id="rem-sub-rec-1" type="result"><query xmlns="jabber:iq:roster"><item subscription="both" jid="admin@test-d" name="admin"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" id="tig3" type="set"><query xmlns="jabber:iq:roster"><item subscription="both" jid="dynrost@test-d" name="dynrost"><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" id="rem-sub-rec-2" from="all-xmpp-test@test-d/def-user-resource" type="available"/>
</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="ed6cb6e9-fd66-4073-8053-2cd55d9b9e75" xml:lang="en" version="1.0"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><auth xmlns="http://jabber.org/features/iq-auth"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-256</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><ver xmlns="urn:xmpp:features:rosterver"/><sub xmlns="urn:xmpp:features:pre-approval"/><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="ed6cb6e9-fd66-4073-8053-2cd55d9b9e75" 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"/><sub xmlns="urn:xmpp:features:pre-approval"/><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"><optional/></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" 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="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" xmlns="jabber:client" id="rem-sub-send-1" type="result"><query xmlns="jabber:iq:roster"><item subscription="both" jid="all-xmpp-test@test-d" name="all-xmpp-test"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" xmlns="jabber:client" id="tig3" type="set"><query xmlns="jabber:iq:roster"><item subscription="both" jid="dynrost@test-d" name="dynrost"><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" id="rem-sub-send-2" from="admin@test-d/def-user-resource" type="available"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" xmlns="jabber:client" id="rem-sub-send-2" from="admin@test-d/def-user-resource" type="available"/>
</INPUT>
<INPUT test='Subscription send'>
<presence to="admin@test-d" xmlns="jabber:client" id="rem-sub-rec-2" from="all-xmpp-test@test-d/def-user-resource" type="available"/>
</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" xmlns="jabber:client" id="rsttig4" type="set"><query ver="5336b4cf323a69c55e4c94d32a2a8d2c" xmlns="jabber:iq:roster"><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" id="rem-sub-send-3" type="result"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="rem-sub-send-4" type="get">
<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" id="rem-sub-send-4" type="result"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" xmlns="jabber:client" id="tig5" type="set"><query xmlns="jabber:iq:roster"><item subscription="both" jid="dynrost@test-d" name="dynrost"><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" id="rsttig4" type="set"><query ver="adf83dcd982f1e824e832b6d1dcf47b7" xmlns="jabber:iq:roster"><item subscription="to" jid="admin@test-d" name="admin"/></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" id="rsttig5" type="set"><query ver="adf83dcd982f1e824e832b6d1dcf47b7" xmlns="jabber:iq:roster"><item subscription="none" jid="admin@test-d" name="admin"/></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" xmlns="jabber:client" id="rsttig6" type="set"><query ver="adf83dcd982f1e824e832b6d1dcf47b7" xmlns="jabber:iq:roster"><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" id="rem-sub-rec-3" type="result"/>
</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" xmlns="jabber:client" id="rem-sub-rec-4" type="result"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" id="tig7" type="set"><query xmlns="jabber:iq:roster"><item subscription="both" jid="dynrost@test-d" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>

</test-history>