### Question:
RepositoryImpl implements Repository { @Override public synchronized byte[] getCode(UscAddress addr) { if (!isExist(addr)) { return EMPTY_BYTE_ARRAY; } AccountState account = getAccountState(addr); if (account.isHibernated()) { return EMPTY_BYTE_ARRAY; } byte[] codeHash = account.getCodeHash(); if (Arrays.equals(codeHash, EMPTY_DATA_HASH)) { return EMPTY_BYTE_ARRAY; } ContractDetails details = getContractDetails(addr); return (details == null) ? null : details.getCode(); } RepositoryImpl(TrieStore store, TrieStore.Pool trieStorePool, int memoryStorageLimit);  RepositoryImpl(
            TrieStore store,
            KeyValueDataSource detailsDS,
            TrieStore.Pool trieStorePool,
            int memoryStorageLimit); private  RepositoryImpl(
            TrieStore store,
            DetailsDataStore detailsDataStore,
            TrieStore.Pool trieStorePool,
            int memoryStorageLimit); @Override synchronized AccountState createAccount(UscAddress addr); @Override synchronized boolean isExist(UscAddress addr); @Override synchronized AccountState getAccountState(UscAddress addr); @Override synchronized void delete(UscAddress addr); @Override synchronized void hibernate(UscAddress addr); @Override synchronized BigInteger increaseNonce(UscAddress addr); @Override synchronized BigInteger getNonce(UscAddress addr); @Override synchronized ContractDetails getContractDetails(UscAddress addr); @Override synchronized void saveCode(UscAddress addr, byte[] code); @Override synchronized byte[] getCode(UscAddress addr); @Override synchronized void addStorageRow(UscAddress addr, DataWord key, DataWord value); @Override synchronized void addStorageBytes(UscAddress addr, DataWord key, byte[] value); @Override synchronized DataWord getStorageValue(UscAddress addr, DataWord key); @Override synchronized byte[] getStorageBytes(UscAddress addr, DataWord key); @Override synchronized Coin getBalance(UscAddress addr); @Override synchronized Coin addBalance(UscAddress addr, Coin value); @Override synchronized Set<UscAddress> getAccountsKeys(); @Override synchronized void dumpState(Block block, long gasUsed, int txNumber, byte[] txHash); @Override synchronized Repository startTracking(); @Override synchronized void flush(); @Override synchronized void flushNoReconnect(); @Override synchronized void commit(); @Override synchronized void rollback(); @Override synchronized void syncToRoot(byte[] root); @Override synchronized boolean isClosed(); @Override synchronized void close(); @Override void reset(); @Override synchronized void updateBatch(Map<UscAddress, AccountState> stateCache,
                                         Map<UscAddress, ContractDetails> detailsCache); @Override synchronized byte[] getRoot(); @Override synchronized void loadAccount(UscAddress addr,
                                         Map<UscAddress, AccountState> cacheAccounts,
                                         Map<UscAddress, ContractDetails> cacheDetails); @Override synchronized Repository getSnapshotTo(byte[] root); @Override synchronized DetailsDataStore getDetailsDataStore(); @Override synchronized void updateContractDetails(UscAddress addr, final ContractDetails contractDetails); @Override synchronized void updateAccountState(UscAddress addr, final AccountState accountState);  }### Answer:
@Test public void getCodeFromUnknownAccount() { RepositoryImpl repository = createRepositoryImpl(config); byte[] code = repository.getCode(randomAccountAddress()); Assert.assertNotNull(code); Assert.assertEquals(0, code.length); }