}
@Test
public void shouldMatchRule() {
RuleKey rule = Rule.create("checkstyle", "IllegalRegexp", "").ruleKey();
assertThat(new IssuePattern("*", "*").matchRule(rule)).isTrue();
assertThat(new IssuePattern("*", "checkstyle:*").matchRule(rule)).isTrue();
assertThat(new IssuePattern("*", "checkstyle:IllegalRegexp").matchRule(rule)).isTrue();
assertThat(new IssuePattern("*", "checkstyle:Illegal*").matchRule(rule)).isTrue();
assertThat(new IssuePattern("*", "*:*Illegal*").matchRule(rule)).isTrue();
assertThat(new IssuePattern("*", "pmd:IllegalRegexp").matchRule(rule)).isFalse();
assertThat(new IssuePattern("*", "pmd:*").matchRule(rule)).isFalse();
assertThat(new IssuePattern("*", "*:Foo*IllegalRegexp").matchRule(rule)).isFalse();
}