### Question:
LocaleFormatter { @Nonnull public static String getFormatted (final double dValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); return NumberFormat.getNumberInstance (aDisplayLocale).format (dValue); } private  LocaleFormatter(); @Nonnull static String getFormatted(final double dValue, @Nonnull final Locale aDisplayLocale); @Nonnull static String getFormatted(final int nValue, @Nonnull final Locale aDisplayLocale); @Nonnull static String getFormatted(final long nValue, @Nonnull final Locale aDisplayLocale); @Nonnull static String getFormatted(@Nonnull final BigInteger aValue, @Nonnull final Locale aDisplayLocale); @Nonnull static String getFormatted(@Nonnull final BigDecimal aValue, @Nonnull final Locale aDisplayLocale); @Nonnull static String getFormatted(@Nonnull final BigDecimal aValue,
                                     @Nonnegative final int nFractionDigits,
                                     @Nonnull final Locale aDisplayLocale); @Nonnull static String getFormattedWithAllFractionDigits(@Nonnull final BigDecimal aValue, @Nonnull final Locale aDisplayLocale); @Nonnull static String getFormattedPercent(final double dValue, @Nonnull final Locale aDisplayLocale); @Nonnull static String getFormattedPercent(final double dValue,
                                            @Nonnegative final int nFractionDigits,
                                            @Nonnull final Locale aDisplayLocale);  }### Answer:
@Test public void testGetFormatted_Double () { assertEquals ("1,1", LocaleFormatter.getFormatted (1.1, L_DE)); assertEquals ("1.1", LocaleFormatter.getFormatted (1.1, L_EN)); }
@Test public void testGetFormatted_Int () { assertEquals ("1.000", LocaleFormatter.getFormatted (1000, L_DE)); assertEquals ("1,000", LocaleFormatter.getFormatted (1000, L_EN)); }
@Test public void testGetFormatted_Long () { assertEquals ("1.000.000", LocaleFormatter.getFormatted (1000000L, L_DE)); assertEquals ("1,000,000", LocaleFormatter.getFormatted (1000000L, L_EN)); }
@Test public void testGetFormattedBigInteger () { assertEquals ("9.223.372.036.854.775.807", LocaleFormatter.getFormatted (BigInteger.valueOf (Long.MAX_VALUE), L_DE)); assertEquals ("9,223,372,036,854,775,807", LocaleFormatter.getFormatted (BigInteger.valueOf (Long.MAX_VALUE), L_EN)); assertEquals ("9.223.372.036.854.775.808", LocaleFormatter.getFormatted (BigInteger.valueOf (Long.MAX_VALUE).add (BigInteger.ONE), L_DE)); assertEquals ("9,223,372,036,854,775,808", LocaleFormatter.getFormatted (BigInteger.valueOf (Long.MAX_VALUE).add (BigInteger.ONE), L_EN)); }