@Override
  public Set<RuleDescriptionSectionDto> generateSections(RulesDefinition.Rule rule) {
    return getDescriptionInHtml(rule)
      .map(this::generateSections)
      .orElse(emptySet());
  }
@Test
  public void parse_moved_noncompliant_code() {
    when(rule.htmlDescription()).thenReturn(DESCRIPTION + RECOMMENTEDCODINGPRACTICE + NONCOMPLIANTCODE + SEE);

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

    Map<String, String> sectionKeyToContent = results.stream().collect(toMap(RuleDescriptionSectionDto::getKey, RuleDescriptionSectionDto::getContent));
    assertThat(sectionKeyToContent).hasSize(4)
      .containsEntry(DEFAULT_SECTION_KEY, rule.htmlDescription())
      .containsEntry(ROOT_CAUSE_SECTION_KEY, DESCRIPTION)
      .containsEntry(ASSESS_THE_PROBLEM_SECTION_KEY, NONCOMPLIANTCODE)
      .containsEntry(HOW_TO_FIX_SECTION_KEY, RECOMMENTEDCODINGPRACTICE + SEE);
  }