public RuleDescriptionSectionsGenerator getRuleDescriptionSectionsGenerator(RulesDefinition.Rule ruleDef) {
    Set<RuleDescriptionSectionsGenerator> generatorsFound = ruleDescriptionSectionsGenerators.stream()
      .filter(generator -> generator.isGeneratorForRule(ruleDef))
      .collect(toSet());
    checkState(generatorsFound.size() < 2, "More than one rule description section generator found for rule with key %s", ruleDef.key());
    checkState(!generatorsFound.isEmpty(), "No rule description section generator found for rule with key %s", ruleDef.key());
    return generatorsFound.iterator().next();
  }
@Test
  public void getRuleDescriptionSectionsGenerator_whenMoreThanOneGeneratorFound_throwsWithCorrectMessage() {
    when(generator1.isGeneratorForRule(rule)).thenReturn(true);
    when(generator2.isGeneratorForRule(rule)).thenReturn(true);
    assertThatIllegalStateException()
      .isThrownBy(() ->  resolver.getRuleDescriptionSectionsGenerator(rule))
      .withMessage("More than one rule description section generator found for rule with key RULE_KEY");
  }