AccountState { public byte[] getEncoded() { if (rlpEncoded == null) { byte[] nonce = RLP.encodeBigInteger(this.nonce); byte[] balance = RLP.encodeBigInteger(this.balance); byte[] stateRoot = RLP.encodeElement(this.stateRoot); byte[] codeHash = RLP.encodeElement(this.codeHash); this.rlpEncoded = RLP.encodeList(nonce, balance, stateRoot, codeHash); } return rlpEncoded; } AccountState(SystemProperties config);  AccountState(BigInteger nonce, BigInteger balance);  AccountState(BigInteger nonce, BigInteger balance, byte[] stateRoot, byte[] codeHash);  AccountState(byte[] rlpData); BigInteger getNonce(); AccountState withNonce(BigInteger nonce); byte[] getStateRoot(); AccountState withStateRoot(byte[] stateRoot); AccountState withIncrementedNonce(); byte[] getCodeHash(); AccountState withCodeHash(byte[] codeHash); BigInteger getBalance(); AccountState withBalanceIncrement(BigInteger value); byte[] getEncoded(); boolean isContractExist(BlockchainConfig blockchainConfig); boolean isEmpty(); String toString();  }
@Test public void testGetEncoded() { String expected = "f85e809" + "a0100000000000000000000000000000000000000000000000000" + "a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" + "a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"; AccountState acct = new AccountState(BigInteger.ZERO, BigInteger.valueOf(2).pow(200)); assertEquals(expected, Hex.toHexString(acct.getEncoded())); }