public static long btcToSatoshi(BigDecimal coins) throws ArithmeticException {
        return coins.movePointRight(SMALLEST_UNIT_EXPONENT).longValueExact();
    }
@Test(expected = ArithmeticException.class)
    public void testBtcToSatoshi_tooPrecise1() {
        btcToSatoshi(new BigDecimal("0.000000001")); // More than SMALLEST_UNIT_EXPONENT precision
    }