     send: (data) ->
         stanza = if data instanceof ltx.Element then data else ltx.parse data
         switch stanza.name
+            when "presence"
+                stanza.attrs.should.have.property "to"
+                stanza.attrs.should.have.property "type"
+                if stanza.attrs.type is "probe"
+                    # Reply to presence probes. If the probed JID is a client,
+                    # reply with 2 online resources: "abc" and "def".
+                    to = stanza.attrs.from ? @config.xmpp.jid
+                    bareFrom = stanza.attrs.to
+                    if "@" in bareFrom
+                        froms = [bareFrom + "/abc", bareFrom + "/def"]
+                    else
+                        froms = [bareFrom]
+                    for from in froms
+                        p = new ltx.Element("presence", from: from, to: to)
+                        @emit "stanza", p.root()
+
             when "iq"
                 stanza.attrs.should.have.property "from"
                 stanza.attrs.should.have.property "to"

                            queryEl.c "item", item
                        iq = @makeIq("result", stanza.attrs.to, stanza.attrs.from, id)
                            .cnode(queryEl)
                            .root()
                        @emit "stanza", iq
            else
                @emit "got-stanza", stanza

                file: "test-suite.log"
            checkCreateNode: -> true
            autosubscribeNewUsers: []
        @server = server.startServer @config

        # Cache IQs sent by the buddycloud server
        @iqs =
