public InternalComponentPropertyDto setValue(@Nullable String value) {
    if (value != null) {
      checkArgument(value.length() <= MAX_VALUE_LENGTH, "value length (%s) is longer than the maximum authorized (%s). '%s' was provided", value.length(), MAX_VALUE_LENGTH, value);
    }
    this.value = value;
    return this;
  }
@Test
  void setValue_throws_IAE_if_value_is_too_long() {
    String veryLongValue = StringUtils.repeat("a", 4001);

    assertThatThrownBy(() -> new InternalComponentPropertyDto().setValue(veryLongValue))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage(String.format("value length (4001) is longer than the maximum authorized (4000). '%s' was provided", veryLongValue));
  }