### Question:
ShardingConfig { static public String longestCommonPrefix(Collection<String> strs) { if (strs.isEmpty()) { return ""; } String minString = strs.stream().min((s1, s2) -> s1.length() - s2.length()).get(); for (int i = 0; i < minString.length(); i++) { final int index = i; if (strs.stream().anyMatch((s -> s.charAt(index) != minString.charAt(index)))) { return minString.substring(0, i); } } return minString; }  static ShardingConfig load(String path); static void initShardingCfg(); List<Schema> getSchemas(); void setSchemas(List<Schema> schemas); boolean isHasInvalidSchema(); void setHasInvalidSchema(boolean hasInvalidSchema); static String longestCommonPrefix(Collection<String> strs); static final String SHARDING_ID_DELIMITER; static volatile Map<String, Set<me.ele.jarch.athena.util.deploy.dalgroupcfg.ShardingTable>> shardingTableMap; }### Answer:
@Test public void testLongestCommonPrefix() { List<String> strs = new ArrayList<>(); strs.add("sku_food_id_mapping_dal_1"); strs.add("sku_food_id_mapping_dal_a"); strs.add("sku_food_id_mapping_dal_[2-100]"); strs.add("sku_food_id_mapping_dal_1000"); assertEquals(ShardingConfig.longestCommonPrefix(strs), "sku_food_id_mapping_dal_"); }