NeoURI { public NeoURI toAddress(String address) { if (!AddressUtils.isValidAddress(address)) { throw new IllegalArgumentException("Invalid address used."); } toAddress = ScriptHash.fromAddress(address); return this; } NeoURI();  NeoURI(Neow3j neow3j); static NeoURI fromURI(String uriString); TransactionBuilder buildTransfer(); NeoURI toAddress(String address); NeoURI toAddress(ScriptHash address); NeoURI asset(byte[] asset); NeoURI asset(ScriptHash asset); NeoURI asset(String asset); NeoURI amount(String amount); NeoURI amount(Integer amount); NeoURI amount(BigInteger amount); NeoURI amount(BigDecimal amount); NeoURI neow3j(Neow3j neow3j); NeoURI wallet(Wallet wallet); NeoURI buildURI(); URI getURI(); String getURIAsString(); String getToAddress(); ScriptHash getAddressAsScriptHash(); ScriptHash getAsset(); String getAssetAsString(); String getAssetAsAddress(); BigDecimal getAmount(); String getAmountAsString();  }
@Test public void buildURI_invalidAddress() { String invalidAddress = "AK2nJJpJr6o664CWJKi1QRXjqeic2zRp"; exceptionRule.expect(IllegalArgumentException.class); exceptionRule.expectMessage("Invalid address"); new NeoURI().toAddress(invalidAddress); }