public static Coin parseCoin(final String str) {
        try {
            long satoshis = btcToSatoshi(new BigDecimal(str));
            return Coin.valueOf(satoshis);
        } catch (ArithmeticException e) {
            throw new IllegalArgumentException(e); // Repackage exception to honor method contract
        }
    }
@Test(expected = IllegalArgumentException.class)
    public void testParseCoinOverprecise() {
        parseCoin("0.000000011");
    }