[SPARK-4631] unit test for MQTT

Please review the unit test for MQTT
Why this extra `receiveMessage`?