[SPARK-4631] unit test for MQTT

Please review the unit test for MQTT
nit: Why is there a String.valueOf(String)?