### Question:
Wallet { public byte[] addAccountWithPrivateKey(byte[] privateKeyBytes) { Account account = new Account(ECKey.fromPrivate(privateKeyBytes)); synchronized (accessLock) { UscAddress addr = addAccount(account); this.initialAccounts.add(addr); return addr.getBytes(); } } Wallet(KeyValueDataSource keyDS); List<byte[]> getAccountAddresses(); String[] getAccountAddressesAsHex(); UscAddress addAccount(); UscAddress addAccount(String passphrase); UscAddress addAccount(Account account); Account getAccount(UscAddress addr); Account getAccount(UscAddress addr, String passphrase); boolean unlockAccount(UscAddress addr, String passphrase, long duration); boolean unlockAccount(UscAddress addr, String passphrase); boolean lockAccount(UscAddress addr); byte[] addAccountWithSeed(String seed); byte[] addAccountWithPrivateKey(byte[] privateKeyBytes); byte[] addAccountWithPrivateKey(byte[] privateKeyBytes, String passphrase);  }### Answer:
@Test public void addAccountWithPrivateKey() { Wallet wallet = WalletFactory.createWallet(); byte[] privateKeyBytes = Keccak256Helper.keccak256("seed".getBytes()); byte[] address = wallet.addAccountWithPrivateKey(privateKeyBytes); Assert.assertNotNull(address); byte[] calculatedAddress = ECKey.fromPrivate(Keccak256Helper.keccak256("seed".getBytes())).getAddress(); Assert.assertArrayEquals(calculatedAddress, address); List<byte[]> addresses = wallet.getAccountAddresses(); Assert.assertNotNull(addresses); Assert.assertFalse(addresses.isEmpty()); Assert.assertEquals(1, addresses.size()); byte[] addr = addresses.get(0); Assert.assertNotNull(addr); Assert.assertArrayEquals(address, addr); }