code: public static boolean eventsEqual(@Nullable final List<CommonEvent> eventsA, @Nullable final List<CommonEvent> eventsB) {
          if ((eventsA == null) && (eventsB == null)) {
              return true;
          }
          if ((eventsA == null) && (eventsB != null)) {
              return false;
          }
          if ((eventsA != null) && (eventsB == null)) {
              return false;
          }
          if (eventsA.size() != eventsB.size()) {
              return false;
          }
          int currentIdx = eventsA.size() - 1;
          int appendIdx = eventsB.size() - 1;
          while (appendIdx >= 0) {
              final CommonEvent current = eventsA.get(currentIdx);
              final CommonEvent append = eventsB.get(appendIdx);
              if (!current.equals(append)) {
                  return false;
              }
              currentIdx--;
              appendIdx--;
          }
          return true;
      }
docs: Tests if both lists contain the same events.
  
  @param eventsA
  First event list.
  @param eventsB
  Second event list.
  
  @return TRUE if both lists have the same size and all event identifiers are equal.