### Question:
TransactionSet { public boolean hasTransaction(Transaction transaction) { return this.transactionsByHash.containsKey(transaction.getHash()); } TransactionSet();  TransactionSet(TransactionSet transactionSet);  TransactionSet(Map<Keccak256, Transaction> transactionsByHash, Map<UscAddress, List<Transaction>> transactionsByAddress); void addTransaction(Transaction transaction); boolean hasTransaction(Transaction transaction); void removeTransactionByHash(Keccak256 hash); List<Transaction> getTransactions(); List<Transaction> getTransactionsWithSender(UscAddress senderAddress);  }### Answer:
@Test public void hasTransaction() { TransactionSet txset = new TransactionSet(); Transaction transaction1 = createSampleTransaction(10); Transaction transaction2 = createSampleTransaction(20); Transaction transaction3 = createSampleTransaction(30); txset.addTransaction(transaction1); txset.addTransaction(transaction2); Assert.assertTrue(txset.hasTransaction(transaction1)); Assert.assertTrue(txset.hasTransaction(transaction2)); Assert.assertFalse(txset.hasTransaction(transaction3)); }