### Question:
PendingTransactionSubscriptionService implements PendingTransactionListener { @Override public void onTransactionAdded(final Transaction pendingTransaction) { notifySubscribers(pendingTransaction); } PendingTransactionSubscriptionService(final SubscriptionManager subscriptionManager); @Override void onTransactionAdded(final Transaction pendingTransaction);  }### Answer:
@Test public void onTransactionAddedMustSendMessage() { final long[] subscriptionIds = new long[] {5, 56, 989}; setUpSubscriptions(Boolean.FALSE, subscriptionIds); final Transaction pending = SimpleTestTransactionBuilder.transaction(TX_ONE); service.onTransactionAdded(pending); verifyZeroInteractions(block); verifyZeroInteractions(blockchain); verifySubscriptionMangerInteractions(messages(TX_ONE, subscriptionIds)); }
@Test public void onTransactionAddedMustSendMessageWithDetails() { final long[] subscriptionIds = new long[] {5, 56, 989}; setUpSubscriptions(Boolean.TRUE, subscriptionIds); final Transaction pending = SimpleTestTransactionBuilder.transaction(TX_ONE); service.onTransactionAdded(pending); verifyZeroInteractions(block); verifyZeroInteractions(blockchain); verifySubscriptionMangerDetailInteractions(messages(pending, subscriptionIds)); }