assertThat(rules.findAll()).hasSize(1);
assertThat(rules.findByRepository("checkstyle")).hasSize(1);
assertThat(rules.findByRepository("unknown")).isEmpty();
Rule rule = rules.find(RuleKey.of("checkstyle", "AvoidNull"));
assertThat(rule).isNotNull();
assertThat(rule.key()).isEqualTo(RuleKey.of("checkstyle", "AvoidNull"));
assertThat(rule.name()).isEqualTo("Avoid Null");
assertThat(rule.description()).isEqualTo("Should avoid NULL");
assertThat(rule.severity()).isEqualTo(Severity.MINOR);
assertThat(rule.internalKey()).isNull();
assertThat(rule.params()).hasSize(1);
RuleParam param = rule.param("myParameter");
assertThat(param).isNotNull();
assertThat(param.description()).isEqualTo("My Parameter");
}