@Test void testConverterNotfound() { Provider provider = mock(Provider.class); IconService iconService = new IconService(provider); Person person = new Person(); person.name = "gold bug"; person.age = new BigInteger("20"); person.hasPermission = false; Call<PersonResponse> call = new Builder() .from(new Address("hxbe258ceb872e08851f1f59694dac2558708ece11")) .to(new Address("cx5bfdb090f43a808005ffc27c25b213145e80b7cd")) .method("addUser") .params(person) .buildWith(PersonResponse.class); assertThrows(IllegalArgumentException.class, () -> { iconService.call(call); }); }
public <T> Request<T> call(Call<T> call) { long requestId = System.currentTimeMillis(); foundation.icon.icx.transport.jsonrpc.Request request = new foundation.icon.icx.transport.jsonrpc.Request( requestId, "icx_call", call.getProperties()); return provider.request(request, findConverter(call.responseType())); }
IconService { public <T> Request<T> call(Call<T> call) { long requestId = System.currentTimeMillis(); foundation.icon.icx.transport.jsonrpc.Request request = new foundation.icon.icx.transport.jsonrpc.Request( requestId, "icx_call", call.getProperties()); return provider.request(request, findConverter(call.responseType())); } }
IconService { public <T> Request<T> call(Call<T> call) { long requestId = System.currentTimeMillis(); foundation.icon.icx.transport.jsonrpc.Request request = new foundation.icon.icx.transport.jsonrpc.Request( requestId, "icx_call", call.getProperties()); return provider.request(request, findConverter(call.responseType())); } @SuppressWarnings("unchecked")  IconService(Provider provider); }
IconService { public <T> Request<T> call(Call<T> call) { long requestId = System.currentTimeMillis(); foundation.icon.icx.transport.jsonrpc.Request request = new foundation.icon.icx.transport.jsonrpc.Request( requestId, "icx_call", call.getProperties()); return provider.request(request, findConverter(call.responseType())); } @SuppressWarnings("unchecked")  IconService(Provider provider); Request<BigInteger> getTotalSupply(); Request<BigInteger> getBalance(Address address); Request<Block> getBlock(BigInteger height); Request<Block> getBlock(Bytes hash); Request<Block> getLastBlock(); @SuppressWarnings("unchecked") Request<List<ScoreApi>> getScoreApi(Address scoreAddress); Request<ConfirmedTransaction> getTransaction(Bytes hash); Request<TransactionResult> getTransactionResult(Bytes hash); Request<T> call(Call<T> call); Request<Bytes> sendTransaction(SignedTransaction signedTransaction); Request<BigInteger> estimateStep(Transaction transaction); void addConverterFactory(RpcConverterFactory factory); }
IconService { public <T> Request<T> call(Call<T> call) { long requestId = System.currentTimeMillis(); foundation.icon.icx.transport.jsonrpc.Request request = new foundation.icon.icx.transport.jsonrpc.Request( requestId, "icx_call", call.getProperties()); return provider.request(request, findConverter(call.responseType())); } @SuppressWarnings("unchecked")  IconService(Provider provider); Request<BigInteger> getTotalSupply(); Request<BigInteger> getBalance(Address address); Request<Block> getBlock(BigInteger height); Request<Block> getBlock(Bytes hash); Request<Block> getLastBlock(); @SuppressWarnings("unchecked") Request<List<ScoreApi>> getScoreApi(Address scoreAddress); Request<ConfirmedTransaction> getTransaction(Bytes hash); Request<TransactionResult> getTransactionResult(Bytes hash); Request<T> call(Call<T> call); Request<Bytes> sendTransaction(SignedTransaction signedTransaction); Request<BigInteger> estimateStep(Transaction transaction); void addConverterFactory(RpcConverterFactory factory);  }