public void create_instance_with_string_property() {
RulesProfile profile = RulesProfile.create("repo", "java");
Rule rule = Rule.create("repo", "org.sonar.api.checks.CheckWithStringProperty", "");
rule.createParameter("pattern");
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("pattern", "foo");
CheckWithStringProperty checkInstance = new CheckWithStringProperty();
AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.asList(checkInstance));
Object check = factory.getCheck(activeRule);