@Override
    public JMXReporter createMetricReporter(Properties properties) {
        String portsConfig = properties.getProperty(ARG_PORT);
        return new JMXReporter(portsConfig);
    }
@Test
    void testPortRangeArgument() {
        Properties properties = new Properties();
        properties.setProperty(JMXReporterFactory.ARG_PORT, "9000-9010");

        JMXReporter metricReporter = new JMXReporterFactory().createMetricReporter(properties);
        try {
            assertThat(metricReporter.getPort())
                    .hasValueSatisfying(
                            port ->
                                    assertThat(port)
                                            .isGreaterThanOrEqualTo(9000)
                                            .isLessThanOrEqualTo(9010));
        } finally {
            metricReporter.close();
        }
    }