public void testRuleMatchesToXMLWithCategory() throws IOException {
final List<RuleMatch> matches = new ArrayList<>();
final String text = "This is a test sentence.";
final List<Element> elements = Collections.emptyList();
final Rule patternRule = new PatternRule("MY_ID", Language.DEMO, elements, "my description", "my message", "short message");
patternRule.setCategory(new Category("MyCategory"));
final RuleMatch match = new RuleMatch(patternRule, 8, 10, "myMessage");
match.setColumn(99);
match.setEndColumn(100);
match.setLine(44);
match.setEndLine(45);