class CoinURI implements Serializable {

    public Value getAmount() {
        return (Value) parameterMap.get(FIELD_AMOUNT);
    }

}

class CoinURITest {

    private CoinURI testObject;
    final CoinType BTC;
    final CoinType BTC_TEST;
    final CoinType LTC;
    final CoinType DOGE;
    final CoinType PPC;
    final CoinType DASH;
    final CoinType NBT;
    final CoinType NSR;
    final CoinType NXT;
    private static final String MAINNET_GOOD_ADDRESS;

    @Test
    public void testGood_Amount() throws CoinURIParseException {

        // Test the decimal parsing
        testObject = new CoinURI(BitcoinMain.get(), BitcoinMain.get().getUriScheme() + ":" + MAINNET_GOOD_ADDRESS
                + "?amount=6543210.12345678");
        assertEquals(654321012345678L, testObject.getAmount().value);

        // Test the decimal parsing
        testObject = new CoinURI(BitcoinMain.get(), BitcoinMain.get().getUriScheme() + ":" + MAINNET_GOOD_ADDRESS
                + "?amount=.12345678");
        assertEquals(12345678L, testObject.getAmount().value);

        // Test the integer parsing
        testObject = new CoinURI(BitcoinMain.get(), BitcoinMain.get().getUriScheme() + ":" + MAINNET_GOOD_ADDRESS
                + "?amount=6543210");
        assertEquals(654321000000000L, testObject.getAmount().value);
    }

}