code: private PlainTimestamp handleMidnight24(PlainTimestamp entity) {
  
          PlainDate date = entity.getCalendarDate();
  
          switch (this.mode) {
              case ElementOperator.OP_NAV_NEXT:
              case ElementOperator.OP_NAV_NEXT_OR_SAME:
                  return date.plus(1, CalendarUnit.DAYS).atStartOfDay();
              case ElementOperator.OP_NAV_PREVIOUS:
              case ElementOperator.OP_NAV_PREVIOUS_OR_SAME:
                  return date.atStartOfDay();
              default:
                  throw new AssertionError("Unknown: " + this.mode);
          }
  
      }
docs: entity is never on 24:00 hence following logic is to be applied