Rational twoThirds = new Rational(10, 15);
assertEquals("2/3", twoThirds.toSimpleString(true));
Rational two = new Rational(10, 5);
assertTrue(two.isInteger());
assertEquals("2", two.toSimpleString(true));
assertEquals("2", two.toSimpleString(false));
Rational twoFifths = new Rational(4, 10);
assertEquals("0.4", twoFifths.toSimpleString(true));
assertEquals("2/5", twoFifths.toSimpleString(false));