Add a test for XMPP server closing