docs: public static List<QuarterDetail> validateQuarters(Collection<QuarterDetail> quarters) {
          if (quarters.size() != 4) {
              throw new IllegalArgumentException("Exactly 4 QuarterDetail must be set: " + quarters);
          }
  
          final List<QuarterDetail> sortedQuarters = new ArrayList<QuarterDetail>(quarters);
          Collections.sort(sortedQuarters);
  
          MonthDay previousEnd = sortedQuarters.get(3).getEnd();
          final Iterator<QuarterDetail> itr = sortedQuarters.iterator();
          for (int i = 0; i < 4; i++) {
              final QuarterDetail q = itr.next();
              if (i != q.getQuarterId()) {
                  throw new IllegalArgumentException(
                          "Quarter " + i + " has an illegal id of " + q.getQuarterId());
              }
  
              if (!q.getStart().equals(previousEnd)) {
                  throw new IllegalArgumentException(
                          "Quarter "
                                  + i
                                  + " start date of "
                                  + q.getStart()
                                  + " is not adjacent to previous quarter's end date of "
                                  + previousEnd);
              }
              previousEnd = q.getEnd();
          }
  
          return sortedQuarters;
      }