<test-history test='Presence 3 (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 id="ed5a5ed8-7a03-492a-9064-5892ed008ebc" from="test-d" xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" xmlns="jabber:client" version="1.0"/>
</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 id="ed5a5ed8-7a03-492a-9064-5892ed008ebc" from="test-d" xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" xmlns="jabber:client" version="1.0"/>
</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 id="bind1" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" 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="sub-uns-rec-1" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq id="sub-uns-rec-1" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="result"><query xmlns="jabber:iq:roster"><item subscription="from" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq id="tig3" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set"><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'>
<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 id="20cd91c7-7acc-45fc-abeb-e532505b30b9" from="test-d" xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" xmlns="jabber:client" version="1.0"/>
</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 id="20cd91c7-7acc-45fc-abeb-e532505b30b9" from="test-d" xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" xmlns="jabber:client" version="1.0"/>
</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 id="bind1" to="admin@test-d/def-user-resource" xmlns="jabber:client" 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="sub-uns-send-1" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq id="sub-uns-send-1" to="admin@test-d/def-user-resource" xmlns="jabber:client" type="result"><query xmlns="jabber:iq:roster"><item subscription="to" name="all-xmpp-test" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq id="tig3" to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set"><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="sub-uns-send-2" to="all-xmpp-test@test-d" type="unsubscribe"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq id="rsttig4" to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set"><query ver="ec9dd13abfea8ef7a897bda91a0b549b" xmlns="jabber:iq:roster"><item subscription="none" name="all-xmpp-test" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="sub-uns-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 id="rsttig5" to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set"><query ver="ec9dd13abfea8ef7a897bda91a0b549b" xmlns="jabber:iq:roster"><item subscription="remove" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence id="sub-uns-send-2" from="admin@test-d" to="all-xmpp-test@test-d" xmlns="jabber:client" type="unsubscribe"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq id="rsttig4" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set"><query ver="76cc7034d837103e4088ad1383192bb4" xmlns="jabber:iq:roster"><item subscription="none" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq id="sub-uns-rec-2" type="set">
<query xmlns="jabber:iq:roster">
<item subscription="remove" jid="admin@test-d"/></query></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq id="rsttig5" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set"><query ver="76cc7034d837103e4088ad1383192bb4" xmlns="jabber:iq:roster"><item subscription="remove" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq id="sub-uns-send-3" to="admin@test-d/def-user-resource" xmlns="jabber:client" type="result"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="sub-uns-send-4" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq id="sub-uns-send-4" to="admin@test-d/def-user-resource" xmlns="jabber:client" type="result"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq id="sub-uns-rec-2" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="result"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq id="sub-uns-rec-3" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq id="sub-uns-rec-3" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="result"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq id="tig6" to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set"><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 id="tig6" to="all-xmpp-test@test-d/def-user-resource" xmlns="jabber:client" type="set"><query xmlns="jabber:iq:roster"><item subscription="both" name="dynrost" jid="dynrost@test-d"><group>test group</group></item></query></iq>
</INPUT>

</test-history>