Refactored xmpp tests