public RuleDto setTags(Set<String> tags) {
    tags.forEach(tag -> checkArgument(tag.length() <= 40, "Rule tag is too long: %s", tag));
    this.tags = tags;
    return this;
  }
@Test
  void setTags_whenTooLong_shouldFail() {
    assertThatThrownBy(() -> {
      Set<String> tags = ImmutableSet.of(repeat("a", 25), repeat("b", 20), repeat("c", 41));
      new RuleDto().setTags(tags);
    })
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessageContaining("Rule tag is too long: ccccccccccccccccccccccccccccccccccccccccc");
  }