### Question:
RoundHelper { @Nonnull public static String getFormatted (final double dValue, @Nonnegative final int nScale, @Nonnull final EDecimalType eType, @Nonnull final Locale aLocale) { ValueEnforcer.isGE0 (nScale, "Scale"); ValueEnforcer.notNull (eType, "Type"); ValueEnforcer.notNull (aLocale, "Locale"); if (Double.isNaN (dValue) || Double.isInfinite (dValue)) return Double.toString (dValue); final DecimalFormat aDF = (DecimalFormat) NumberFormat.getInstance (aLocale); aDF.setDecimalFormatSymbols (DecimalFormatSymbols.getInstance (aLocale)); aDF.setMaximumFractionDigits (nScale); aDF.setMinimumFractionDigits (nScale); if (eType.isExponential ()) { String sPattern = "0E0"; if (nScale > 0) sPattern += '.' + StringHelper.getRepeated ('0', nScale); aDF.applyPattern (sPattern); } else { aDF.setGroupingUsed (false); aDF.setMinimumIntegerDigits (1); } return aDF.format (dValue); } private  RoundHelper(); static double getRounded(final double dValue,
                                   @Nonnegative final int nScale,
                                   @Nonnull final RoundingMode eMode,
                                   @Nonnull final EDecimalType eType); static double getRoundedUpFix(final double dValue, @Nonnegative final int nScale); static double getRoundedUpFix2(final double dValue); static double getRoundedEvenExp(final double dValue, @Nonnegative final int nScale); static double getRoundedEvenExp2(final double dValue); @Nonnull static String getFormatted(final double dValue,
                                     @Nonnegative final int nScale,
                                     @Nonnull final EDecimalType eType,
                                     @Nonnull final Locale aLocale); @Nonnull static String getFormattedFix(final double dValue, @Nonnegative final int nScale, final Locale aLocale); @Nonnull static String getFormattedFix2(final double dValue, final Locale aLocale); @Nonnull static String getFormattedExp(final double dValue, @Nonnegative final int nScale, final Locale aLocale); @Nonnull static String getFormattedExp2(final double dValue, final Locale aLocale);  }### Answer:
@SuppressFBWarnings ("TQ_NEVER_VALUE_USED_WHERE_ALWAYS_REQUIRED") @Test public void testGetFormatted () { final double d = 1.1; try { RoundHelper.getFormatted (d, -1, EDecimalType.FIX, Locale.US); fail (); } catch (final IllegalArgumentException ex) {} try { RoundHelper.getFormatted (d, 1, null, Locale.US); fail (); } catch (final NullPointerException ex) {} try { RoundHelper.getFormatted (d, 1, EDecimalType.EXP, null); fail (); } catch (final NullPointerException ex) {} }