code: public void setDuration(@NotNull final Duration duration) {
          if (duration.compareTo(MAXIMUM_DURATION) > 0) {
              throw new IllegalArgumentException("The duaration has to be smaller than 23:59:59.");
          }
          super.setValue(durationToDate(duration));
      }
docs: Sets the duration value
  
  @param duration
  duration, only values less then 23:59:59 are excepted