public static Fiat parseFiat(final String currencyCode, final String str) {
        try {
            long val = new BigDecimal(str).movePointRight(SMALLEST_UNIT_EXPONENT).longValueExact();
            return Fiat.valueOf(currencyCode, val);
        } catch (ArithmeticException e) {
            throw new IllegalArgumentException(e);
        }
    }
@Test
    public void testParseFiat() {
        assertEquals(1, Fiat.parseFiat("EUR", "0.0001").value);
        assertEquals(1, Fiat.parseFiat("EUR", "0.00010").value);
    }