<test-history test='Presence 1 (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="d63f2782-5297-4568-93f9-55172dffc2e9" 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="d63f2782-5297-4568-93f9-55172dffc2e9" 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="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="sub-rec-1"><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="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'>
<iq type="result" id="tig3"/>
</OUTPUT>
<OUTPUT test='Subscription receive'>
<presence id="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="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="a7e7c027-cd5e-49bf-84ab-f22edbfeb1c2" 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="a7e7c027-cd5e-49bf-84ab-f22edbfeb1c2" 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="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="sub-send-1"><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="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'>
<iq type="result" id="tig3"/>
</OUTPUT>
<OUTPUT test='Subscription send'>
<presence id="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="sub-send-2"/>
</INPUT>
<OUTPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" id="sub-send-3" type="subscribe"/>
</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="df58fd0385eb4088a4bb46dff2599862"><item subscription="none" ask="subscribe" name="all-xmpp-test" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" xmlns="jabber:client" from="admin@test-d" type="subscribe" id="sub-send-3"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence to="admin@test-d" id="sub-rec-3" type="subscribed"/>
</OUTPUT>
<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="df58fd0385eb4088a4bb46dff2599862"><item subscription="from" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence to="admin@test-d" id="sub-rec-4" type="subscribe"/>
</OUTPUT>
<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="df58fd0385eb4088a4bb46dff2599862"><item subscription="from" ask="subscribe" name="admin" jid="admin@test-d"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<presence to="admin@test-d" xmlns="jabber:client" from="all-xmpp-test@test-d" type="subscribed" id="sub-rec-3"/>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set" id="rsttig5"><query xmlns="jabber:iq:roster" ver="df58fd0385eb4088a4bb46dff2599862"><item subscription="to" name="all-xmpp-test" jid="all-xmpp-test@test-d"/></query></iq>
</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="sub-rec-2"/>
</INPUT>
<INPUT test='Subscription send'>
<presence to="admin@test-d" xmlns="jabber:client" from="all-xmpp-test@test-d" type="subscribe" id="sub-rec-4"/>
</INPUT>
<OUTPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" id="sub-send-4" type="subscribed"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" xmlns="jabber:client" type="set" id="rsttig6"><query xmlns="jabber:iq:roster" ver="df58fd0385eb4088a4bb46dff2599862"><item subscription="both" name="all-xmpp-test" jid="all-xmpp-test@test-d"/></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="get" id="sub-send-5">
<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="sub-send-5"><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="tig7"><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="subscribed" id="sub-send-4"/>
</INPUT>
<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="df58fd0385eb4088a4bb46dff2599862"><item subscription="both" 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/def-user-resource" type="available" id="sub-send-2"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="get" id="sub-rec-5">
<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="sub-rec-5"><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="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>