@Test public void testConvertToNubitsURI() throws Exception { Address goodAddress = new Address(MainNetParams.get(), MAINNET_GOOD_ADDRESS); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?amount=12.34&label=Hello&message=AMessage", NubitsURI.convertToNubitsURI(goodAddress, parseCoin("12.34"), "Hello", "AMessage")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?amount=12.34&label=Hello%20World&message=Mess%20%26%20age%20%2B%20hope", NubitsURI.convertToNubitsURI(goodAddress, parseCoin("12.34"), "Hello World", "Mess & age + hope")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?label=Hello&message=glory", NubitsURI.convertToNubitsURI(goodAddress, null, "Hello", "glory")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?amount=0.1&message=glory", NubitsURI.convertToNubitsURI(goodAddress, parseCoin("0.1"), null, "glory")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?amount=0.1&message=glory", NubitsURI.convertToNubitsURI(goodAddress, parseCoin("0.1"), "", "glory")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?amount=12.34&label=Hello", NubitsURI.convertToNubitsURI(goodAddress, parseCoin("12.34"), "Hello", null)); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?amount=12.34&label=Hello", NubitsURI.convertToNubitsURI(goodAddress, parseCoin("12.34"), "Hello", "")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?amount=1000", NubitsURI.convertToNubitsURI(goodAddress, parseCoin("1000"), null, null)); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?amount=1000", NubitsURI.convertToNubitsURI(goodAddress, parseCoin("1000"), "", "")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?label=Hello", NubitsURI.convertToNubitsURI(goodAddress, null, "Hello", null)); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?message=Agatha", NubitsURI.convertToNubitsURI(goodAddress, null, null, "Agatha")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS + "?message=Agatha", NubitsURI.convertToNubitsURI(goodAddress, null, "", "Agatha")); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS, NubitsURI.convertToNubitsURI(goodAddress, null, null, null)); assertEquals("Nu:" + MAINNET_GOOD_ADDRESS, NubitsURI.convertToNubitsURI(goodAddress, null, "", "")); }
public static String convertToNubitsURI(Address address, Coin amount, String label, String message) { return convertToNubitsURI(address.toString(), amount, label, message); }
NubitsURI { public static String convertToNubitsURI(Address address, Coin amount, String label, String message) { return convertToNubitsURI(address.toString(), amount, label, message); } }
NubitsURI { public static String convertToNubitsURI(Address address, Coin amount, String label, String message) { return convertToNubitsURI(address.toString(), amount, label, message); } NubitsURI(String uri);  NubitsURI(@Nullable NetworkParameters params, String input); }
NubitsURI { public static String convertToNubitsURI(Address address, Coin amount, String label, String message) { return convertToNubitsURI(address.toString(), amount, label, message); } NubitsURI(String uri);  NubitsURI(@Nullable NetworkParameters params, String input); @Nullable Address getAddress(); Monetary getAmount(); String getLabel(); String getMessage(); String getPaymentRequestUrl(); List<String> getPaymentRequestUrls(); Object getParameterByName(String name); @Override String toString(); static String convertToNubitsURI(Address address, Coin amount, String label, String message); static String convertToNubitsURI(String address, @Nullable Coin amount, @Nullable String label,
            @Nullable String message); }
NubitsURI { public static String convertToNubitsURI(Address address, Coin amount, String label, String message) { return convertToNubitsURI(address.toString(), amount, label, message); } NubitsURI(String uri);  NubitsURI(@Nullable NetworkParameters params, String input); @Nullable Address getAddress(); Monetary getAmount(); String getLabel(); String getMessage(); String getPaymentRequestUrl(); List<String> getPaymentRequestUrls(); Object getParameterByName(String name); @Override String toString(); static String convertToNubitsURI(Address address, Coin amount, String label, String message); static String convertToNubitsURI(String address, @Nullable Coin amount, @Nullable String label,
            @Nullable String message); 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; @Deprecated
    static final String NUBITS_SCHEME; }