<test-history test='Test 30'>
<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" id="6083e27b-8fd6-4cfd-8337-fdcedc85957e" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</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>DIGEST-MD5</mechanism><mechanism>CRAM-MD5</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><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='DIGEST-MD5'/>
</OUTPUT>
<INPUT test='Subscription receive'>
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InRlc3QtZCIsbm9uY2U9InpSUVUzbXgrM28vcEpYMEo3MmFub3ZEc3dONmtacnV4akw2YmpDWTkiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription receive'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9InpSUVUzbXgrM28vcEpYMEo3MmFub3ZEc3dONmtacnV4akw2YmpDWTkiLG5jPTAwMDAwMDAxLGNub25jZT0iS1UvblhnK0FSN2E4OCsxVmsxaTg5TzM0cUtmTlJScTRMUHU5cXJEWCIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT1iMWY3ODEwZTgxM2FlZjkwOTg4ZTQ4MWQ4NTc0NzVkMCxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription receive'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD05M2Q2ZjAzZDc0ODI1MzI0MzZkMGIxYzAyMDgyNWYwNA==</success>
</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" id="6083e27b-8fd6-4cfd-8337-fdcedc85957e" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><register xmlns="http://jabber.org/features/iq-register"/><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>res-1</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq type="result" to="all-xmpp-test@test-d/res-1" id="bind1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>all-xmpp-test@test-d/res-1</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence id="1"/>
</OUTPUT>
<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" id="0b501269-71eb-4238-bc0e-5223623ab527" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</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>DIGEST-MD5</mechanism><mechanism>CRAM-MD5</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><register xmlns="http://jabber.org/features/iq-register"/><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='DIGEST-MD5'/>
</OUTPUT>
<INPUT test='Subscription send'>
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InRlc3QtZCIsbm9uY2U9IllFWUM3NnozRnI3SE1lZE80Q0VTUDcyblBZYmVRUFhWNE9zLzg4UVMiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription send'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9IllFWUM3NnozRnI3SE1lZE80Q0VTUDcyblBZYmVRUFhWNE9zLzg4UVMiLG5jPTAwMDAwMDAxLGNub25jZT0iek5XU2Z6eVFHKzRFWTQwZTNCUlZSbUxsOXp2OStSQVkrYXJlR3BMZyIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT1hMWRmOThmYmMyYzYxYjE5ZWQ3MDE0MGM2ODcxMzJiMCxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription send'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD1jNTFhMzIxNDdjYzlmODkwODM2OGE1MDQxMjczYjMwNQ==</success>
</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" id="0b501269-71eb-4238-bc0e-5223623ab527" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><register xmlns="http://jabber.org/features/iq-register"/><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>res-2</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="result" to="all-xmpp-test@test-d/res-2" id="bind1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>all-xmpp-test@test-d/res-2</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence id="1"/>
</OUTPUT>
<INPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" id="1" from="all-xmpp-test@test-d/res-1"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" id="1" from="all-xmpp-test@test-d/res-2"/>
</INPUT>

</test-history>