void () { String expectedFileName = FileUtil.toSystemDependentName("C:\\path\\to\\MyFile.java"); String expectedMessage = "Line matches the illegal pattern 'System\\.(out|err).*?$'. [RegexpSinglelineJava]"; testCase(""" [INFO] Starting audit... [ERROR] C:\\path\\to\\MyFile.java:9: Line matches the illegal pattern 'System\\.(out|err).*?$'. [RegexpSinglelineJava] Audit done.""") .withParsers(new JavaBuildErrorNotification()) .expect(expectedMessage, new FileEventMatcher(expectedMessage, expectedFileName, 8, 0)) .withSkippedOutput() .check(); }