Change Int to Integer to avoid overflow in ratio calculations.
Correct test case