public static String extractCommonSuffix(List<String> uris) {
      // 1st pass on collection: find a common suffix.
      for (int suffixLen = 0; suffixLen < uris.get(0).length(); suffixLen++) {
         char c = uris.get(0).charAt(uris.get(0).length() - suffixLen - 1);
         for (int i = 1; i < uris.size(); i++) {
            if (suffixLen >= uris.get(i).length() || uris.get(i).charAt(uris.get(i).length() - suffixLen - 1) != c) {
               // Mismatch found. Have we found at least one common char ?
               if (suffixLen > 0) {
                  String commonString = uris.get(i).substring(uris.get(i).length() - suffixLen - 1);
                  if (commonString.indexOf('/') != -1) {
                     return commonString.substring(commonString.indexOf('/'));
                  }
                  return null;
               } else {
                  return null;
               }
            }
         }
      }
      return null;
   }
@Test
   void extractCommonSuffix() {
      final var uris = List.of("/ab/def", "/cde/def");
      final var result = DispatchCriteriaHelper.extractCommonSuffix(uris);
      assertEquals("/def", result);
   }