### Question:
RoundHelper { public static double getRounded (final double dValue, @Nonnegative final int nScale, @Nonnull final RoundingMode eMode, @Nonnull final EDecimalType eType) { ValueEnforcer.isGE0 (nScale, "Scale"); ValueEnforcer.notNull (eMode, "RoundingMode"); ValueEnforcer.notNull (eType, "Type"); if (Double.isNaN (dValue) || Double.isInfinite (dValue)) return dValue; final BigDecimal bd = BigDecimal.valueOf (dValue); double ret; if (eType.isExponential ()) { final BigDecimal bc = new BigDecimal (bd.unscaledValue (), bd.precision () - 1); ret = bc.setScale (nScale, eMode).scaleByPowerOfTen (bc.scale () - bd.scale ()).doubleValue (); } else ret = bd.setScale (nScale, eMode).doubleValue (); return ret; } 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 testGetRounded () { final double d = 1.1; try { RoundHelper.getRounded (d, -1, RoundingMode.CEILING, EDecimalType.FIX); fail (); } catch (final IllegalArgumentException ex) {} try { RoundHelper.getRounded (d, 1, null, EDecimalType.FIX); fail (); } catch (final NullPointerException ex) {} try { RoundHelper.getRounded (d, 1, RoundingMode.CEILING, null); fail (); } catch (final NullPointerException ex) {} }