.setName("Old custom")
.setHtmlDescription("Old description")
.setSeverity(Severity.MINOR)
.setStatus(RuleStatus.BETA)
.setParameters(ImmutableMap.of("regex", "a"));
RuleKey customRuleKey = ruleService.create(newRule);
session.clearCache();
WsTester.TestRequest request = wsTester.newGetRequest("api/rules", "update")
.setParam("key", customRuleKey.toString())
.setParam("name", "My custom rule")
.setParam("markdown_description", "Description")
.setParam("severity", "MAJOR")
.setParam("status", "BETA")
.setParam("params", "regex=a.*");