NumberUtil { public static double getDouble(double d, int scale) { return getDouble(d, scale, ROUNDING_MODE); }  static int limitInt(int value, int min, int max); static long limitLong(long value, long min, long max); static int getRandomInt(int min, int max); static long getRandomLong(long bound); static float getRandomFloat(float bound, int scale); static float getRandomFloat(float bound, int scale, int roundingMode); static double getRandomDouble(double bound, int scale); static double getRandomDouble(double bound, int scale, int roundingMode); static double getDouble(double d, int scale); static double getDouble(double d, int scale, int roundingMode);  }
@Test public void testGetDouble() { double d = 12.345; assertEquals(NumberUtil.getDouble(d, 2), 12.35); }