public RuleDto addRuleDescriptionSectionDto(RuleDescriptionSectionDto ruleDescriptionSectionDto) {
    checkArgument(!hasDescriptionSectionWithSameKeyAndContext(ruleDescriptionSectionDto),
      ERROR_MESSAGE_SECTION_ALREADY_EXISTS, ruleDescriptionSectionDto.getKey(),
      Optional.ofNullable(ruleDescriptionSectionDto.getContext()).map(RuleDescriptionSectionContextDto::getKey).orElse(null));
    ruleDescriptionSectionDtos.add(ruleDescriptionSectionDto);
    return this;
  }
@Test
  void addRuleDescriptionSectionDto_whenSameSectionAndContext_shouldThrowError() {
    RuleDto dto = new RuleDto();
    String contextKey = randomAlphanumeric(50);
    String displayName = randomAlphanumeric(50);
    RuleDescriptionSectionDto section1 = createSection(SECTION_KEY, contextKey, displayName);
    dto.addRuleDescriptionSectionDto(section1);
    RuleDescriptionSectionDto section2 = createSection(SECTION_KEY, contextKey, displayName);

    assertThatThrownBy(() -> dto.addRuleDescriptionSectionDto(section2))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage(String.format(ERROR_MESSAGE_SECTION_ALREADY_EXISTS, SECTION_KEY, contextKey));
  }