AccountState implements Serializable { public void setBalance(BigInteger balance) { logger.traceEntry("params: {}", balance); Util.check(!(balance == null || balance.compareTo(BigInteger.ZERO) < 0), "balance>=0"); this.balance = balance; logger.traceExit(); } AccountState(AccountAddress address);  AccountState(BigInteger nonce, BigInteger balance, AccountAddress address);  AccountState(AccountState source); BigInteger getNonce(); void setNonce(BigInteger nonce); BigInteger getBalance(); void setBalance(BigInteger balance); BigInteger addToBalance(BigInteger value); AccountAddress getAddress(); @Override String toString();  }
@Test(expected = IllegalArgumentException.class) public void testAccountStateSetBalanceNegativeShouldThrowException() { AccountState accountState = new AccountState(AccountAddress.EMPTY_ADDRESS); accountState.setBalance(BigInteger.valueOf(-1)); }
@Test(expected = IllegalArgumentException.class) public void testAccountStateSetBalanceNullShouldThrowException() { AccountState accountState = new AccountState(AccountAddress.EMPTY_ADDRESS); accountState.setBalance(null); }