public static TimeUnit getMetricsRateUnit(Map<String, Object> daemonConf) {
        return getTimeUnitForConfig(daemonConf, Config.STORM_DAEMON_METRICS_REPORTER_PLUGIN_RATE_UNIT);
    }
@Test
    public void getMetricsRateUnit() {
        Map<String, Object> daemonConf = new HashMap<>();

        assertNull(MetricsUtils.getMetricsRateUnit(daemonConf));

        daemonConf.put(Config.STORM_DAEMON_METRICS_REPORTER_PLUGIN_RATE_UNIT, "SECONDS");
        assertEquals(TimeUnit.SECONDS, MetricsUtils.getMetricsRateUnit(daemonConf));

        daemonConf.put(Config.STORM_DAEMON_METRICS_REPORTER_PLUGIN_RATE_UNIT, "MINUTES");
        assertEquals(TimeUnit.MINUTES, MetricsUtils.getMetricsRateUnit(daemonConf));
    }