Testcase for https://github.com/esl/MongooseIM/pull/243