static Hashtable<String, String> generateJmxTable(Map<String, String> variables) {
        Hashtable<String, String> ht = new Hashtable<>(variables.size());
        for (Map.Entry<String, String> variable : variables.entrySet()) {
            ht.put(
                    replaceInvalidChars(variable.getKey()),
                    replaceInvalidChars(variable.getValue()));
        }
        return ht;
    }
@Test
    void testGenerateTable() {
        Map<String, String> vars = new HashMap<>();
        vars.put("key0", "value0");
        vars.put("key1", "value1");
        vars.put("\"key2,=;:?'", "\"value2 (test),=;:?'");

        Hashtable<String, String> jmxTable = JMXReporter.generateJmxTable(vars);

        assertThat(jmxTable).containsEntry("key0", "value0");
        assertThat(jmxTable).containsEntry("key0", "value0");
        assertThat(jmxTable).containsEntry("key1", "value1");
        assertThat(jmxTable).containsEntry("key2------", "value2_(test)------");
    }