docs: public static void merge(List<PathDetail> pathDetails, List<PathDetail> otherDetails) {
          // Make sure that the PathDetail list is merged correctly at via points
          if (!pathDetails.isEmpty() && !otherDetails.isEmpty()) {
              PathDetail lastDetail = pathDetails.get(pathDetails.size() - 1);
              if (lastDetail.getValue().equals(otherDetails.get(0).getValue())) {
                  lastDetail.setLast(otherDetails.get(0).getLast());
                  otherDetails.remove(0);
              }
          }
  
          pathDetails.addAll(otherDetails);
      }