@Override
  public Set<RuleDescriptionSectionDto> generateSections(RulesDefinition.Rule rule) {
    return getDescriptionInHtml(rule)
      .map(this::generateSections)
      .orElse(emptySet());
  }
@Test
  public void parse_to_risk_description_fields_when_desc_contains_no_section() {
    String descriptionWithoutTitles = "description without titles";
    when(rule.htmlDescription()).thenReturn(descriptionWithoutTitles);

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

    Map<String, String> sectionKeyToContent = results.stream().collect(toMap(RuleDescriptionSectionDto::getKey, RuleDescriptionSectionDto::getContent));
    assertThat(sectionKeyToContent).hasSize(2)
      .containsEntry(ROOT_CAUSE_SECTION_KEY, descriptionWithoutTitles)
      .containsEntry(DEFAULT_SECTION_KEY, rule.htmlDescription());

  }