<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="jabber:client" version="1.0" xml:lang="en" id="eb960505-99c9-498f-8eb8-b10801b70023" xmlns:stream="http://etherx.jabber.org/streams" from="test-d"/>
</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>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="jabber:client" version="1.0" xml:lang="en" id="eb960505-99c9-498f-8eb8-b10801b70023" xmlns:stream="http://etherx.jabber.org/streams" from="test-d"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><register xmlns="http://jabber.org/features/iq-register"/><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 xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" 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 xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" type="result" id="rem-sub-rec-1"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" name="admin" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" type="set" id="tig3"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><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 xmlns="jabber:client" to="all-xmpp-test@test-d" type="available" id="rem-sub-rec-2" from="all-xmpp-test@test-d/def-user-resource"/>
</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="jabber:client" version="1.0" xml:lang="en" id="c07bee05-da9f-4478-ae13-2c0f9c8df476" xmlns:stream="http://etherx.jabber.org/streams" from="test-d"/>
</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>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="jabber:client" version="1.0" xml:lang="en" id="c07bee05-da9f-4478-ae13-2c0f9c8df476" xmlns:stream="http://etherx.jabber.org/streams" from="test-d"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><register xmlns="http://jabber.org/features/iq-register"/><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 xmlns="jabber:client" to="admin@test-d/def-user-resource" 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 xmlns="jabber:client" to="admin@test-d/def-user-resource" type="result" id="rem-sub-send-1"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" name="all-xmpp-test" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" to="admin@test-d/def-user-resource" type="set" id="tig3"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><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 xmlns="jabber:client" to="admin@test-d" type="available" id="rem-sub-send-2" from="admin@test-d/def-user-resource"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" to="all-xmpp-test@test-d" type="available" id="rem-sub-send-2" from="admin@test-d/def-user-resource"/>
</INPUT>
<INPUT test='Subscription send'>
<presence xmlns="jabber:client" to="admin@test-d" type="available" id="rem-sub-rec-2" from="all-xmpp-test@test-d/def-user-resource"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="set" id="rem-sub-send-3">
<query xmlns="jabber:iq:roster">
<item jid="all-xmpp-test@test-d" subscription="remove"/></query></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" to="admin@test-d/def-user-resource" type="set" id="rsttig4"><query xmlns="jabber:iq:roster" ver="cbb7589e41c6ec1dc77b02e5de20f204"><item jid="all-xmpp-test@test-d" subscription="remove"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" to="all-xmpp-test@test-d" type="unavailable" from="admin@test-d/def-user-resource"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" to="all-xmpp-test@test-d" type="unsubscribe" from="admin@test-d"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" type="set" id="rsttig4"><query xmlns="jabber:iq:roster" ver="9e219b5882149b5d2040021b36eb4824"><item jid="admin@test-d" name="admin" subscription="to"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence xmlns="jabber:client" to="all-xmpp-test@test-d" type="unsubscribed" from="admin@test-d"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" type="set" id="rsttig5"><query xmlns="jabber:iq:roster" ver="9e219b5882149b5d2040021b36eb4824"><item jid="admin@test-d" name="admin" subscription="none"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="set" id="rem-sub-rec-3">
<query xmlns="jabber:iq:roster">
<item jid="admin@test-d" subscription="remove"/></query></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" type="set" id="rsttig6"><query xmlns="jabber:iq:roster" ver="9e219b5882149b5d2040021b36eb4824"><item jid="admin@test-d" subscription="remove"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" to="admin@test-d/def-user-resource" 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 send'>
<iq xmlns="jabber:client" to="admin@test-d/def-user-resource" type="result" id="rem-sub-send-4"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" 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 xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" type="result" id="rem-sub-rec-4"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq xmlns="jabber:client" to="admin@test-d/def-user-resource" type="set" id="tig5"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><group>test group</group></item></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq xmlns="jabber:client" to="all-xmpp-test@test-d/def-user-resource" type="set" id="tig7"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><group>test group</group></item></query></iq>
</INPUT>

</test-history>