### Question:
ScheduleUtil { public static String getLeader(Collection<String> serverUuidList) { if (serverUuidList == null || serverUuidList.size() == 0) { return ""; } long no = Long.MAX_VALUE; long tmpNo = -1; String leader = null; for (String server : serverUuidList) { tmpNo = NumberUtils.toLong(server.substring(server.lastIndexOf("$") + 1)); if (no > tmpNo) { no = tmpNo; leader = server; } } return leader; }  static String getLocalHostName(); static String getLocalIP(); static String dataToString(Date d); static String runningEntryFromTaskName(String taskName, String ownSign); static String taskNameFromRunningEntry(String runningEntry); static String ownsignFromRunningEntry(String runningEntry); static int[] generateSequence(int nodeCount, int jobCount, int nodeCapacity); static String getLeader(Collection<String> serverUuidList); static boolean isLeader(String serverUuid, List<String> serverUuidList);  }### Answer:
@Test public void getLeader() { List<String> serverList = new ArrayList<>(); serverList.add("$000005"); serverList.add("$000003"); serverList.add("$000001"); serverList.add("$000002"); assertEquals("$000001", ScheduleUtil.getLeader(serverList)); }