NumericDDMFormFieldTemplateContextContributor implements DDMFormFieldTemplateContextContributor { protected Map<String, String> getSymbolsMap(Locale locale) { DecimalFormat formatter = NumericDDMFormFieldUtil.getNumberFormat( locale); DecimalFormatSymbols decimalFormatSymbols = formatter.getDecimalFormatSymbols(); return HashMapBuilder.put( "decimalSymbol", String.valueOf(decimalFormatSymbols.getDecimalSeparator()) ).put( "thousandsSeparator", String.valueOf(decimalFormatSymbols.getGroupingSeparator()) ).build(); }  @Override Map<String, Object> getParameters(
		DDMFormField ddmFormField,
		DDMFormFieldRenderingContext ddmFormFieldRenderingContext);  }
@Test public void testGetDecimalSymbolsWithAmericanLocale() { Map<String, String> separatorSymbolsMap = _numericDDMFormFieldTemplateContextContributor.getSymbolsMap( LocaleUtil.US); Assert.assertEquals(".", separatorSymbolsMap.get("decimalSymbol")); Assert.assertEquals(",", separatorSymbolsMap.get("thousandsSeparator")); }
@Test public void testGetDecimalSymbolsWithBrazilianLocale() { Map<String, String> separatorSymbolsMap = _numericDDMFormFieldTemplateContextContributor.getSymbolsMap( LocaleUtil.BRAZIL); Assert.assertEquals(",", separatorSymbolsMap.get("decimalSymbol")); Assert.assertEquals(".", separatorSymbolsMap.get("thousandsSeparator")); }