@Override
  public Set<RuleDescriptionSectionDto> generateSections(RulesDefinition.Rule rule) {
    Set<RuleDescriptionSectionDto> advancedSections = rule.ruleDescriptionSections().stream()
      .map(this::toRuleDescriptionSectionDto)
      .collect(Collectors.toSet());
    return addLegacySectionToAdvancedSections(advancedSections, rule);
  }
@Test
  public void generateSections_whenNoSections_returnsDefault() {
    when(rule.ruleDescriptionSections()).thenReturn(emptyList());

    Set<RuleDescriptionSectionDto> ruleDescriptionSectionDtos = generator.generateSections(rule);

    assertThat(ruleDescriptionSectionDtos).containsOnly(LEGACY_SECTION);
  }