LocalizedValueUtil { public static Map<String, Object> toLocalizedValuesMap( LocalizedValue localizedValue) { if (localizedValue == null) { return Collections.emptyMap(); } Map<Locale, String> values = localizedValue.getValues(); Set<Map.Entry<Locale, String>> entrySet = values.entrySet(); Stream<Map.Entry<Locale, String>> stream = entrySet.stream(); return stream.collect( Collectors.toMap( entry -> LanguageUtil.getLanguageId(entry.getKey()), entry -> { String value = entry.getValue(); if (Validator.isNotNull(value)) { try { return JSONFactoryUtil.createJSONArray(value); } catch (JSONException jsonException) { if (_log.isDebugEnabled()) { _log.debug(jsonException, jsonException); } } } return value; })); }  @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 testToLocalizedValuesMapNullLocalizedValue() { Assert.assertEquals( Collections.emptyMap(), LocalizedValueUtil.toLocalizedValuesMap(null)); }
@Test public void testToLocalizedValuesMapValidLocalizedValue() { Map<String, Object> map = LocalizedValueUtil.toLocalizedValuesMap( new LocalizedValue() { { addString(LocaleUtil.US, "en_US"); addString(LocaleUtil.BRAZIL, "pt_BR"); } }); Assert.assertEquals("en_US", map.get("en_US")); }