### Question:
ShardInfoDownloader { public void processAllPeersShardingInfo() { shardInfoByPeers.entrySet().removeIf( entry -> (entry.getValue().isShardingOff == true) ); shardInfoByPeers.keySet().forEach((pa) -> { processPeerShardingInfo(pa, shardInfoByPeers.get(pa)); }); log.debug("ShardingInfo requesting result {}", sortedByIdShards); sortedByIdShards.keySet().forEach((idx) -> { shardsDesisons.put(idx, checkShard(idx)); }); } @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 testProcessAllPeersShardingInfo() { downloader.setShardInfoByPeers(shardInfoByPeers_ALL_GOOD); downloader.processAllPeersShardingInfo(); int size = downloader.getGoodPeersMap().size(); assertEquals(3, size); }