LocalizedValueUtil { public static Map<Locale, String> toLocaleStringMap( Map<String, Object> localizedValues) { if (MapUtil.isEmpty(localizedValues)) { return Collections.emptyMap(); } Map<Locale, String> localeStringMap = new HashMap<>(); for (Map.Entry<String, Object> entry : localizedValues.entrySet()) { localeStringMap.put( LocaleUtil.fromLanguageId(entry.getKey()), (String)entry.getValue()); } return localeStringMap; }  @Deprecated static Object getLocalizedValue(
		Locale locale, Map<String, Object> localizedValues); static JSONObject toJSONObject(Map<String, V> map); static Map<Locale, String> toLocaleStringMap(
		Map<String, Object> localizedValues); static LocalizedValue toLocalizedValue(
		Map<String, Object> localizedValues); static LocalizedValue toLocalizedValue(
		Map<String, Object> localizedValues, Locale locale); @Deprecated static Map<String, V> toLocalizedValues(JSONObject jsonObject); static Map<String, Object> toLocalizedValuesMap(
		LocalizedValue localizedValue); static Map<String, Object> toStringObjectMap(
		Map<Locale, String> localizedValues);  }
@Test public void testToLocaleStringMapEmptyKeyValue() { Map<Locale, String> map = LocalizedValueUtil.toLocaleStringMap( HashMapBuilder.<String, Object>put( "", "" ).build()); Assert.assertEquals("", map.get(LocaleUtil.US)); }
@Test public void testToLocaleStringMapEmptyMap() { Assert.assertEquals( Collections.emptyMap(), LocalizedValueUtil.toLocaleStringMap(new HashMap<>())); }
@Test public void testToLocaleStringMapValidMap() { Map<Locale, String> map = LocalizedValueUtil.toLocaleStringMap( HashMapBuilder.<String, Object>put( "en_US", "en_US" ).build()); Assert.assertEquals("en_US", map.get(LocaleUtil.US)); }