CoinURI { public Value getAmount() { return (Value) parameterMap.get(FIELD_AMOUNT); } CoinURI(String uri);  CoinURI(@Nullable CoinType uriType, String input); CoinType getType(); @Nullable Address getAddress(); Value getAmount(); String getLabel(); String getMessage(); String getPaymentRequestUrl(); Object getParameterByName(String name); @Override String toString(); static String convertToCoinURI(Address address, @Nullable Value amount,
                                          @Nullable String label, @Nullable String message); String toUriString(); static final String FIELD_MESSAGE; static final String FIELD_LABEL; static final String FIELD_AMOUNT; static final String FIELD_ADDRESS; static final String FIELD_PAYMENT_REQUEST_URL; }
@Test public void testGood_Amount() throws CoinURIParseException { testObject = new CoinURI(BitcoinMain.get(), BitcoinMain.get().getUriScheme() + ":" + MAINNET_GOOD_ADDRESS + "?amount=6543210.12345678"); assertEquals(654321012345678L, testObject.getAmount().value); testObject = new CoinURI(BitcoinMain.get(), BitcoinMain.get().getUriScheme() + ":" + MAINNET_GOOD_ADDRESS + "?amount=.12345678"); assertEquals(12345678L, testObject.getAmount().value); testObject = new CoinURI(BitcoinMain.get(), BitcoinMain.get().getUriScheme() + ":" + MAINNET_GOOD_ADDRESS + "?amount=6543210"); assertEquals(654321000000000L, testObject.getAmount().value); }