### Question:
IconService { public Request<Block> getBlock(BigInteger height) { long requestId = System.currentTimeMillis(); RpcObject params = new RpcObject.Builder() .put("height", new RpcValue(height)) .build(); foundation.icon.icx.transport.jsonrpc.Request request = new foundation.icon.icx.transport.jsonrpc.Request( requestId, "icx_getBlockByHeight", params); return provider.request(request, findConverter(Block.class)); } @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);  }### Answer:
@Test void testGetBlockByHash() { Provider provider = mock(Provider.class); Bytes hash = new Bytes("0x033f8d96045eb8301fd17cf078c28ae58a3ba329f6ada5cf128ee56dc2af26f7"); IconService iconService = new IconService(provider); iconService.getBlock(hash); HashMap<String, RpcValue> params = new HashMap<>(); params.put("hash", new RpcValue(hash)); verify(provider).request( argThat(request -> isRequestMatches(request, "icx_getBlockByHash", params)), argThat(Objects::nonNull)); }
@Test void testGetBlockByHeight() { Provider provider = mock(Provider.class); IconService iconService = new IconService(provider); iconService.getBlock(BigInteger.ONE); HashMap<String, RpcValue> params = new HashMap<>(); params.put("height", new RpcValue(BigInteger.ONE)); verify(provider).request( argThat(request -> isRequestMatches(request, "icx_getBlockByHeight", params)), argThat(Objects::nonNull)); }