f = Fraction.getFraction(Integer.MIN_VALUE, 1); try { f = f.invert(); fail("expecting ArithmeticException"); } catch (ArithmeticException ex) {}  f = Fraction.getFraction(Integer.MAX_VALUE, 1); f = f.invert(); assertEquals(1, f.getNumerator()); assertEquals(Integer.MAX_VALUE, f.getDenominator());
    public void testInvert() {        Fraction f = null;                f = Fraction.getFraction(50, 75);        f = f.invert();        assertEquals(75, f.getNumerator());        assertEquals(50, f.getDenominator());                f = Fraction.getFraction(4, 3);        f = f.invert();        assertEquals(3, f.getNumerator());        assertEquals(4, f.getDenominator());                f = Fraction.getFraction(0, 3);        try {            f = f.invert();        } catch (ArithmeticException ex) {}    }