ECKey cowKey = ECKey.fromPrivate(HashUtil.sha3("cow".getBytes()));
repository.createAccount(cowKey.getAddress());
repository.addBalance(cowKey.getAddress(), BigInteger.TEN);
Wallet wallet = new Wallet();
wallet.setWorldManager(worldManager);
wallet.importKey(cowKey.getPrivKeyBytes());
Transaction tx = new Transaction(
new byte[]{},
Hex.decode("09184E72A000"),
Hex.decode("03E8"),
cowKey.getAddress(),
Hex.decode("0A"),
new byte[]{}
);
ECKey catKey = ECKey.fromPrivate(HashUtil.sha3("cat".getBytes()));
tx.sign(catKey.getPrivKeyBytes());
wallet.applyTransaction(tx);
BigInteger walletBalance = wallet.getBalance(cowKey.getAddress());
Assert.assertEquals(BigInteger.valueOf(20), walletBalance);
}