NewRule customRule = NewRule.createForCustomRule("MY_CUSTOM", templateRule.getKey())
.setName("My custom")
.setSeverity(Severity.MINOR)
.setStatus(RuleStatus.READY)
.setMarkdownDescription("<div>line1\nline2</div>");
RuleKey customRuleKey = ruleService.create(customRule);
session.clearCache();
WsTester.TestRequest request = wsTester.newGetRequest("api/rules", "show")
.setParam("key", customRuleKey.toString());
request.execute().assertJson(getClass(), "encode_html_description_of_custom_rule.json", false);
}