### Question:
ShardInfoDownloader { public boolean processPeerShardingInfo(String pa, ShardingInfo si) { Objects.requireNonNull(pa, "peerAddress is NULL"); Objects.requireNonNull(si, "shardInfo is NULL"); boolean haveShard = false; log.trace("shardInfo = {}", si); if (si != null) { for (ShardInfo s : si.shards) { if (myChainId.equals(UUID.fromString(s.chainId))) { haveShard = true; synchronized (this) { Set<String> ps = shardsPeers.get(s.shardId); if (ps == null) { ps = new HashSet<>(); shardsPeers.put(s.shardId, ps); } ps.add(pa); Set<ShardInfo> rs = sortedByIdShards.get(s.shardId); if (rs == null) { rs = new HashSet<>(); sortedByIdShards.put(s.shardId, rs); } rs.add(s); } } } } return haveShard; } @Inject  ShardInfoDownloader(PeersService peers); void setShardInfoByPeers(Map<String, ShardingInfo> testData); void processAllPeersShardingInfo(); boolean processPeerShardingInfo(String pa, ShardingInfo si); ShardingInfo getShardingInfoFromPeer(String addr); Map<String, ShardingInfo> getShardInfoFromPeers(); ShardInfo getShardInfo(Long shardId); double getShardWeight(Long shardId); Map<Long, Double> getShardRelativeWeights(); static final String SHARD_ID_ENV; }### Answer:
@Test public void testProcessPeerShardingInfo() { downloader.setShardInfoByPeers(shardInfoByPeers_ALL_GOOD); downloader.processAllPeersShardingInfo(); String pa = "1"; ShardingInfo si = shardInfoByPeers_ALL_GOOD.get(pa); boolean expResult = true; boolean result = downloader.processPeerShardingInfo(pa, si); assertEquals(expResult, result); }