[SPARK-4631] unit test for MQTT

Please review the unit test for MQTT
Can you make the batchDuration shorter, so that there are faster batches and this unit test finishes faster?