### Question:
TransactionGateway { public List<Transaction> receiveTransactionsFrom(List<Transaction> txs, NodeID nodeID) { txs.forEach(tx -> transactionNodeInformation.addTransactionToNode(tx.getHash(), nodeID)); return transactionPool.addTransactions(txs); } TransactionGateway(
            ChannelManager channelManager,
            TransactionPool transactionPool,
            CompositeEthereumListener emitter); void start(); void stop(); List<Transaction> receiveTransactionsFrom(List<Transaction> txs, NodeID nodeID);  }### Answer:
@Test public void addsReceivedTransactionsToTransactionPool() { List<Transaction> txs = Collections.singletonList(tx); gateway.receiveTransactionsFrom(txs, node); verify(transactionPool, times(1)).addTransactions(txs); }
@Test public void relayingTransactionSkipsSenderNode() { List<Transaction> txs = Collections.singletonList(tx); gateway.receiveTransactionsFrom(txs, node); listener.onPendingTransactionsReceived(txs); verify(channelManager, times(1)).broadcastTransaction(tx, Collections.singleton(node)); }