public SnapshotDto setProjectVersion(@Nullable String projectVersion) {
    checkLength(MAX_VERSION_LENGTH, projectVersion, "projectVersion");
    this.projectVersion = projectVersion;
    return this;
  }
@Test
  void fail_if_projectVersion_is_longer_then_100_characters() {
    SnapshotDto snapshotDto = new SnapshotDto();
    snapshotDto.setProjectVersion(null);
    snapshotDto.setProjectVersion("1.0");
    snapshotDto.setProjectVersion(repeat("a", 100));

    assertThatThrownBy(() -> snapshotDto.setProjectVersion(repeat("a", 101)))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("projectVersion" +
        " length (101) is longer than the maximum authorized (100). " +
        "'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' was provided.");
  }