### Question:
PeerServerSegmentFinder { public static List<URI> getPeerServerURIs(String segmentName, String downloadScheme, HelixManager helixManager) { LLCSegmentName llcSegmentName = new LLCSegmentName(segmentName); String tableNameWithType = TableNameBuilder.forType(TableType.REALTIME).tableNameWithType(llcSegmentName.getTableName()); HelixAdmin helixAdmin = helixManager.getClusterManagmentTool(); String clusterName = helixManager.getClusterName(); if (clusterName == null) { _logger.error("ClusterName not found"); return ListUtils.EMPTY_LIST; } final List<URI> onlineServerURIs = new ArrayList<>(); try { RetryPolicies.exponentialBackoffRetryPolicy(MAX_NUM_ATTEMPTS, INITIAL_DELAY_MS, DELAY_SCALE_FACTOR).attempt(() -> { getOnlineServersFromExternalView(segmentName, downloadScheme, tableNameWithType, helixAdmin, clusterName, onlineServerURIs); return onlineServerURIs.size() > 0; }); } catch (Exception e) { _logger.error("Failure in getting online servers for segment {}", segmentName, e); } return onlineServerURIs; }  static List<URI> getPeerServerURIs(String segmentName, String downloadScheme, HelixManager helixManager);  }### Answer:
@Test public void testSegmentFoundSuccessfully() throws Exception { List<URI> httpServerURIs = PeerServerSegmentFinder.getPeerServerURIs(SEGMENT_1, CommonConstants.HTTP_PROTOCOL, _helixManager); assertEquals(2, httpServerURIs.size()); httpServerURIs.contains(new URI(StringUtil.join("/", "http: httpServerURIs.contains(new URI(StringUtil.join("/", "http: List<URI> httpsServerURIs = PeerServerSegmentFinder.getPeerServerURIs(SEGMENT_1, CommonConstants.HTTPS_PROTOCOL, _helixManager); assertEquals(2, httpsServerURIs.size()); httpServerURIs.contains(new URI(StringUtil.join("/", "https: httpServerURIs.contains(new URI(StringUtil.join("/", "https: }
@Test public void testSegmentNotFound() throws Exception { Assert.assertEquals(0, PeerServerSegmentFinder.getPeerServerURIs(SEGMENT_2, CommonConstants.HTTP_PROTOCOL, _helixManager).size()); }