### Question:
MinerUtils { public List<org.ethereum.core.Transaction> getAllTransactions(TransactionPool transactionPool) { List<Transaction> txs = transactionPool.getPendingTransactions(); return PendingState.sortByPriceTakingIntoAccountSenderAndNonce(txs); }  static co.usc.ulordj.core.UldTransaction getUlordMergedMiningCoinbaseTransaction(co.usc.ulordj.core.NetworkParameters params, MinerWork work); static co.usc.ulordj.core.UldTransaction getUlordMergedMiningCoinbaseTransaction(co.usc.ulordj.core.NetworkParameters params, byte[] blockHashForMergedMining); static co.usc.ulordj.core.UldTransaction getUlordMergedMiningCoinbaseTransactionWithTwoTags(
            co.usc.ulordj.core.NetworkParameters params,
            MinerWork work,
            MinerWork work2); static co.usc.ulordj.core.UldTransaction getUlordMergedMiningCoinbaseTransactionWithTwoTags(
            co.usc.ulordj.core.NetworkParameters params,
            byte[] blockHashForMergedMining1,
            byte[] blockHashForMergedMining2); static co.usc.ulordj.core.UldBlock getUlordMergedMiningBlock(co.usc.ulordj.core.NetworkParameters params, UldTransaction transaction); static co.usc.ulordj.core.UldBlock getUlordMergedMiningBlock(co.usc.ulordj.core.NetworkParameters params, List<UldTransaction> transactions); static byte[] buildMerkleProof(
            BlockchainNetConfig blockchainConfig,
            Function<MerkleProofBuilder, byte[]> proofBuilderFunction,
            long blockNumber); List<org.ethereum.core.Transaction> getAllTransactions(TransactionPool transactionPool); List<org.ethereum.core.Transaction> filterTransactions(List<Transaction> txsToRemove, List<Transaction> txs, Map<UscAddress, BigInteger> accountNonces, Repository originalRepo, Coin minGasPrice);  }### Answer:
@Test public void getAllTransactionsTest() { TransactionPool transactionPool = Mockito.mock(TransactionPool.class); Transaction tx1 = Mockito.mock(Transaction.class); Transaction tx2 = Mockito.mock(Transaction.class); byte[] s1 = new byte[32]; byte[] s2 = new byte[32]; s1[0] = 0; s2[0] = 1; Mockito.when(tx1.getHash()).thenReturn(new Keccak256(s1)); Mockito.when(tx2.getHash()).thenReturn(new Keccak256(s2)); List<Transaction> txs = new LinkedList<>(); txs.add(tx1); txs.add(tx2); Mockito.when(transactionPool.getPendingTransactions()).thenReturn(txs); List<Transaction> res = new MinerUtils().getAllTransactions(transactionPool); Assert.assertEquals(2, res.size()); }