code: public static boolean areRightLinksConsistent(CalendarHashChain calendarHashChain1,
                                                    CalendarHashChain calendarHashChain2) {
          notNull(calendarHashChain1, "CalendarHashChain");
          notNull(calendarHashChain2, "CalendarHashChain");
          List<CalendarHashChainLink> rightLinks1 = getRightLinks(calendarHashChain1);
          List<CalendarHashChainLink> rightLinks2 = getRightLinks(calendarHashChain2);
          if (rightLinks1.size() != rightLinks2.size()) {
              logger.info("Calendar hash chains have different amount of right links: {} vs {}",
                      rightLinks1.size(), rightLinks2.size());
              return false;
          }
  
          for (int i = 0; i < rightLinks2.size(); i++) {
              CalendarHashChainLink link1 = rightLinks2.get(i);
              CalendarHashChainLink link2 = rightLinks1.get(i);
              if (!link1.getDataHash().equals(link2.getDataHash())) {
                  logger.info("Calendar hash chain right links do not match at right link number {}", i + 1);
                  return false;
              }
          }
          return true;
      }
docs: Checks consistency of two calendar hash chains: <ul>
  <li>both calendar hash chains have same amount of right links</li>
  <li>right chain links in the first chain are equal to the right chain links in the second chain</li>
  </ul>
  
  @param calendarHashChain1 first calendar hash chain
  @param calendarHashChain2 second calendar hash chain
  @return true if both chains have same amount of right chain links and
  all right chain link hash values are equal