public static Locale getMetricsReporterLocale(Map<String, Object> daemonConf) {
        String languageTag = ObjectReader.getString(daemonConf.get(Config.STORM_DAEMON_METRICS_REPORTER_PLUGIN_LOCALE), null);
        if (languageTag != null) {
            return Locale.forLanguageTag(languageTag);
        }
        return null;
    }
@Test
    public void getMetricsReporterLocale() {
        Map<String, Object> daemonConf = new HashMap<>();

        assertNull(MetricsUtils.getMetricsReporterLocale(daemonConf));

        daemonConf.put(Config.STORM_DAEMON_METRICS_REPORTER_PLUGIN_LOCALE, "en-US");
        assertEquals(Locale.US, MetricsUtils.getMetricsReporterLocale(daemonConf));
    }