public void shouldOverridePropertyKey() {
RulesProfile profile = RulesProfile.create("repo", "java");
Rule rule = Rule.create("repo", "org.sonar.api.checks.CheckWithOverriddenPropertyKey", "");
rule.createParameter("maximum");
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("maximum", "300");
AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithOverriddenPropertyKey.class));
Object check = factory.getCheck(activeRule);
assertThat(((CheckWithOverriddenPropertyKey) check).getMax()).isEqualTo(300);
}