CalculPrice { public static double round(double number) { return round(number, DEFAULT_DECIMAL_NUMBER); }  static final double getGenericPrice(double price, double discount, double taxe, int binaryMask); static final double removeTaxe(double price, double tax); static final double getDiscountCost(double price, double discount); static final double applyDiscount(double price, double discount); static final double mergeDiscount(double productDiscount, double ticketDiscount); static double applyTax(double price, double taxRate); static double getTaxCost(double price, double taxRate); static double round(double number); static double round(double number, int decimalNumber); static final int DEFAULT_DECIMAL_NUMBER; }
@Test public void truncTest() { double a = 0.2225d; assertEquals(0.223d, CalculPrice.round(a, 3)); }