### Question:
BlockChainManagerImpl implements BlockChainManager<T> { @Override public void addTransaction(Transaction tx) { try { transactionStore.addTransaction(tx); log.trace("AddTransaction: txStore added tx={}", tx.getHash().toString()); } catch (Exception e) { throw new FailedOperationException(e); } } BlockChainManagerImpl(BlockChainStore blockChainStore); @Override void initGenesis(Block genesisBlock); @Override void loadTransaction(); @Override int verify(Transaction transaction); @Override int verify(ConsensusBlock<T> block); @Override void addBlock(ConsensusBlock<T> nextBlock); @Override void batchTxs(ConsensusBlock<T> block); @Override void addTransaction(Transaction tx); @Override void flushUnconfirmedTxs(Set<Sha3Hash> keys); @Override void updateTxCache(Block block); @Override ConsensusBlock<T> getLastConfirmedBlock(); @Override ConsensusBlock<T> getBlockByHash(Sha3Hash hash); @Override ConsensusBlock<T> getBlockByIndex(long index); @Override Transaction getTxByHash(Sha3Hash hash); @Override Collection<Transaction> getRecentTxs(); @Override List<Transaction> getUnconfirmedTxs(); @Override List<Transaction> getUnconfirmedTxsWithLimit(long limit); @Override int getUnconfirmedTxsSize(); @Override Receipt getReceipt(String key); @Override Sha3Hash getLastHash(); @Override long getLastIndex(); @Override long countOfBlocks(); @Override boolean containsBlockHash(Sha3Hash blockHash); @Override boolean containsTxHash(Sha3Hash txHash); @Override boolean contains(Block block); @Override boolean contains(Transaction transaction); @Override void close();  }### Answer:
@Test public void addTransactionTest() { Transaction tx = BlockChainTestUtils.createTransferTx(); assertEquals(32000, blockChainManager.verify(tx)); blockChainManager.addTransaction(tx); assertEquals(32016, blockChainManager.verify(tx)); blockChainManager.addTransaction(tx); Transaction invalidTx = BlockChainTestUtils.createInvalidTransferTx(); assertEquals(32035, blockChainManager.verify(invalidTx)); assertEquals(0, blockChainManager.getRecentTxs().size()); assertEquals(1, blockChainManager.getUnconfirmedTxs().size()); assertTrue(blockChainManager.getUnconfirmedTxs().contains(tx)); assertTrue(blockChainManager.contains(tx)); assertFalse(blockChainManager.contains(invalidTx)); assertEquals(tx, blockChainManager.getTxByHash(tx.getHash())); }