### Question:
EthereumUtils { public static EthBalanceBean getBalance(String ethAddress, String url) throws Exception { Web3j web3 = Web3jFactory.build(new HttpService(url)); BigInteger wei = getBalanceFromApi(web3, ethAddress, DefaultBlockParameterName.LATEST); if (wei == null) { wei = new BigInteger("0"); } BigDecimal ether = Convert.fromWei(wei.toString(), Convert.Unit.ETHER); BigInteger unconfirmedWei = getBalanceFromApi(web3, ethAddress, DefaultBlockParameterName.PENDING); if (unconfirmedWei == null) { unconfirmedWei = new BigInteger("0"); } unconfirmedWei = unconfirmedWei.subtract(wei); BigDecimal unconfirmedEther = Convert.fromWei(unconfirmedWei.toString(), Convert.Unit.ETHER); return new EthBalanceBean(wei, ether, unconfirmedWei, unconfirmedEther); }  static EthBalanceBean getBalance(String ethAddress, String url); static Pair<EthSendTransaction, GenerateSignatureResponseApdu> sendTransaction(
            BigInteger gasPrice, BigInteger gasLimit, String from,
            String to, BigInteger value, IsoDep isoTag,
            String publicKey, String data, String url, byte chainId, int keyIndex, byte[] pin); static BigInteger getNextNonce(Web3j web3j, String etherAddress);  }### Answer:
@Test public void testGetBalanceTest() throws Exception { final EthBalanceBean balance = EthereumUtils.getBalance(TransactionSigner.credentials.getAddress(), ROPSTEN_URI); assertTrue(balance.getEther().doubleValue() > 0); assertTrue(balance.getWei().doubleValue() > 0); assertEquals(new BigDecimal("0"), balance.getUnconfirmedEther()); assertEquals(new BigInteger("0"), balance.getUnconfirmedWei()); }