### Question:
PendingTransactions { public Optional<Transaction> getTransactionByHash(final Hash transactionHash) { return Optional.ofNullable(pendingTransactions.get(transactionHash)) .map(TransactionInfo::getTransaction); } PendingTransactions(
      final int maxTransactionRetentionHours,
      final int maxPendingTransactions,
      final int maxPooledTransactionHashes,
      final Clock clock,
      final MetricsSystem metricsSystem,
      final Supplier<BlockHeader> chainHeadHeaderSupplier,
      final Optional<EIP1559> eip1559,
      final Percentage priceBump); void evictOldTransactions(); boolean addRemoteTransaction(final Transaction transaction); @VisibleForTesting TransactionAddedStatus addLocalTransaction(final Transaction transaction); void selectTransactions(final TransactionSelector selector); long maxSize(); int size(); boolean containsTransaction(final Hash transactionHash); Optional<Transaction> getTransactionByHash(final Hash transactionHash); Set<TransactionInfo> getTransactionInfo(); OptionalLong getNextNonceForSender(final Address sender); void tryEvictTransactionHash(final Hash hash);  }### Answer:
@Test public void shouldReturnEmptyOptionalWhenNoTransactionWithGivenHashExists() { assertThat(transactions.getTransactionByHash(Hash.EMPTY_TRIE_HASH)).isEmpty(); }