### Question:
ExchangeRate implements Serializable { public Fiat coinToFiat(Coin convertCoin) { final BigInteger converted = BigInteger.valueOf(convertCoin.value).multiply(BigInteger.valueOf(fiat.value)) .divide(BigInteger.valueOf(coin.value)); if (converted.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0 || converted.compareTo(BigInteger.valueOf(Long.MIN_VALUE)) < 0) throw new ArithmeticException("Overflow"); return Fiat.valueOf(fiat.currencyCode, converted.longValue()); } ExchangeRate(Coin coin, Fiat fiat);  ExchangeRate(Fiat fiat); Fiat coinToFiat(Coin convertCoin); Coin fiatToCoin(Fiat convertFiat); final Coin coin; final Fiat fiat; }### Answer:
@Test(expected = ArithmeticException.class) public void coinToFiatTooLarge() throws Exception { ExchangeRate rate = new ExchangeRate(Fiat.parseFiat("XXX", "1000000000")); rate.coinToFiat(Coin.parseCoin("1000000")); }
@Test(expected = ArithmeticException.class) public void coinToFiatTooSmall() throws Exception { ExchangeRate rate = new ExchangeRate(Fiat.parseFiat("XXX", "1000000000")); rate.coinToFiat(Coin.parseCoin("-1000000")); }