### Question:
BesuEventsImpl implements BesuEvents { @Override public long addTransactionAddedListener(final TransactionAddedListener listener) { return transactionPool.subscribePendingTransactions(listener::onTransactionAdded); } BesuEventsImpl(
      final Blockchain blockchain,
      final BlockBroadcaster blockBroadcaster,
      final TransactionPool transactionPool,
      final SyncState syncState); @Override long addBlockPropagatedListener(final BlockPropagatedListener listener); @Override void removeBlockPropagatedListener(final long listenerIdentifier); @Override long addBlockAddedListener(final BlockAddedListener listener); @Override void removeBlockAddedListener(final long listenerIdentifier); @Override long addBlockReorgListener(final BlockReorgListener listener); @Override void removeBlockReorgListener(final long listenerIdentifier); @Override long addTransactionAddedListener(final TransactionAddedListener listener); @Override void removeTransactionAddedListener(final long listenerIdentifier); @Override long addTransactionDroppedListener(
      final TransactionDroppedListener transactionDroppedListener); @Override void removeTransactionDroppedListener(final long listenerIdentifier); @Override long addSyncStatusListener(final SyncStatusListener syncStatusListener); @Override void removeSyncStatusListener(final long listenerIdentifier); @Override long addLogListener(
      final List<Address> addresses,
      final List<List<Bytes32>> topics,
      final LogListener logListener); @Override void removeLogListener(final long listenerIdentifier);  }### Answer:
@Test public void transactionAddedEventFiresAfterSubscribe() { final AtomicReference<Transaction> result = new AtomicReference<>(); serviceImpl.addTransactionAddedListener(result::set); assertThat(result.get()).isNull(); transactionPool.addLocalTransaction(TX1); assertThat(result.get()).isNotNull(); }