### Question:
Peer extends PeerSocketHandler { public void addWallet(Wallet wallet) { wallets.add(wallet); } Peer(NetworkParameters params, VersionMessage ver, @Nullable AbstractBlockChain chain, PeerAddress remoteAddress);  Peer(NetworkParameters params, VersionMessage ver, PeerAddress remoteAddress,
				@Nullable AbstractBlockChain chain, @Nullable MemoryPool mempool);  Peer(NetworkParameters params, AbstractBlockChain blockChain, PeerAddress peerAddress, String thisSoftwareName, String thisSoftwareVersion); void addEventListener(PeerEventListener listener); void addEventListener(PeerEventListener listener, Executor executor); boolean removeEventListener(PeerEventListener listener); @Override String toString(); @Override void connectionClosed(); @Override void connectionOpened(); ListenableFuture<Peer> getConnectionOpenFuture(); ListenableFuture<List<Transaction>> downloadDependencies(Transaction tx); ListenableFuture<Block> getBlock(Sha256Hash blockHash); ListenableFuture<Transaction> getPeerMempoolTransaction(Sha256Hash hash); void setDownloadParameters(long secondsSinceEpoch, boolean useFilteredBlocks); void addWallet(Wallet wallet); void removeWallet(Wallet wallet); void startBlockChainDownload(); ListenableFuture<Long> ping(); long getLastPingTime(); long getPingTime(); int getPeerBlockHeightDifference(); boolean getDownloadData(); void setDownloadData(boolean downloadData); VersionMessage getPeerVersionMessage(); VersionMessage getVersionMessage(); long getBestHeight(); boolean setMinProtocolVersion(int minProtocolVersion); void setBloomFilter(BloomFilter filter); BloomFilter getBloomFilter();  }### Answer:
@Test public void invDownloadTxMultiPeer() throws Exception { VersionMessage ver = new VersionMessage(unitTestParams, 100); InetSocketAddress address = new InetSocketAddress("127.0.0.1", 4242); Peer peer2 = new Peer(unitTestParams, ver, new PeerAddress(address), blockChain, memoryPool); peer2.addWallet(wallet); VersionMessage peerVersion = new VersionMessage(unitTestParams, OTHER_PEER_CHAIN_HEIGHT); peerVersion.clientVersion = 70001; peerVersion.localServices = VersionMessage.NODE_NETWORK; connect(); InboundMessageQueuer writeTarget2 = connect(peer2, peerVersion); BigInteger value = Utils.toNanoCoins(1, 0); Transaction tx = createFakeTx(unitTestParams, value, this.address); InventoryMessage inv = new InventoryMessage(unitTestParams); InventoryItem item = new InventoryItem(InventoryItem.Type.Transaction, tx.getHash()); inv.addItem(item); inbound(writeTarget, inv); GetDataMessage message = (GetDataMessage)outbound(writeTarget); assertEquals(1, message.getItems().size()); assertEquals(tx.getHash(), message.getItems().get(0).hash); assertTrue(memoryPool.maybeWasSeen(tx.getHash())); inbound(writeTarget2, inv); pingAndWait(writeTarget2); assertNull(outbound(writeTarget2)); }