NumberUtils { public static Double getStringToDoubleNonRounded(Locale locale, String stringToBeParsed) { boolean doRound = false; return getStringToDouble(locale, stringToBeParsed, doRound); }  static Double neg(Double value); static Double getStringToDoubleNonRounded(Locale locale,
                                                     String stringToBeParsed); static Double getStringToDoubleRounded(Locale locale,
            String stringToBeParsed); static Double divide(Double dividend, Integer divisor); static DivisionResult divideWithLoss(Double dividend,
            Integer divisor, boolean resultToBeNegative); static Double multiply(Double factorA, Integer factorB); static Double multiply(Double factorA, Double factorB); static Double divide(Double dividend, Double divisor); static Double divideForExchangeRates(Double dividend, Double divisor); static Double ensureExchangeRateMinMax(Double double1); static Double ensureAmountMinMax(Double double1); static boolean isExceedingAmountLimit(Double double1); static Double invertExchangeRateDouble(Double exchangeRate); static Double divide(Double dividend, Double divisor, int scale); static double round(double nonRounded);  }
@Test public void testRoundingStringToDoubleUnrounded() { Assert.assertEquals(Double.valueOf(14.3333333d), NumberUtils.getStringToDoubleNonRounded(Locale.UK, "14.3333333")); Assert.assertEquals(Double.valueOf(14.335d), NumberUtils.getStringToDoubleNonRounded(Locale.UK, "14.335")); Assert.assertEquals(Double.valueOf(14.3333333d), NumberUtils.getStringToDoubleNonRounded(Locale.GERMANY, "14,3333333")); Assert.assertEquals(Double.valueOf(14.335d), NumberUtils.getStringToDoubleNonRounded(Locale.GERMANY, "14,335")); Assert.assertEquals(Double.valueOf(0d), NumberUtils.getStringToDoubleNonRounded(Locale.GERMANY, ",")); Assert.assertEquals(Double.valueOf(0d), NumberUtils.getStringToDoubleNonRounded(Locale.GERMANY, null)); Assert.assertEquals(Double.valueOf(0d), NumberUtils.getStringToDoubleNonRounded(Locale.GERMANY, "")); }