async function testMqtt(mqttSuccessMessage, mqttCheckType, receivedMessage) {
    const hiveMQContainer = await new HiveMQContainer().start();
    const connectionString = hiveMQContainer.getConnectionString();
    const mqttMonitorType = new MqttMonitorType();
    const monitor = {
        jsonPath: "firstProp", // always return firstProp for the json-query monitor
        hostname: connectionString.split(":", 2).join(":"),
        mqttTopic: "test",
        port: connectionString.split(":")[2],
        mqttUsername: null,
        mqttPassword: null,
        interval: 20, // controls the timeout
        mqttSuccessMessage: mqttSuccessMessage, // for keywords
        expectedValue: mqttSuccessMessage, // for json-query
        mqttCheckType: mqttCheckType,
    };
    const heartbeat = {
        msg: "",
        status: PENDING,
    };

    const testMqttClient = mqtt.connect(hiveMQContainer.getConnectionString());
    testMqttClient.on("connect", () => {
        testMqttClient.subscribe("test", (error) => {
            if (!error) {
                testMqttClient.publish("test", receivedMessage);
            }
        });
    });

    try {
        await mqttMonitorType.check(monitor, heartbeat, {});
    } finally {
        testMqttClient.end();
        hiveMQContainer.stop();
    }
    return heartbeat;
}
Runs an MQTT test with the
@param  {string} mqttSuccessMessage the message that the monitor expects
@param {null|"keyword"|"json-query"} mqttCheckType the type of check we perform
@param {string} receivedMessage what message is recieved from the mqtt channel
@returns {Promise<Heartbeat>} the heartbeat produced by the check