public SnapshotDto setBuildString(@Nullable String buildString) {
    checkLength(MAX_BUILD_STRING_LENGTH, buildString, "buildString");
    this.buildString = buildString;
    return this;
  }
@Test
  void fail_if_buildString_is_longer_then_100_characters() {
    SnapshotDto snapshotDto = new SnapshotDto();
    snapshotDto.setBuildString(null);
    snapshotDto.setBuildString("1.0");
    snapshotDto.setBuildString(repeat("a", 100));

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