public void shouldAddPatternToExcludeSeveralLineRanges() throws Exception {
regexpScanner.scan(javaFile, new File(Resources.getResource(
"org/sonar/batch/issue/ignore/scanner/IssueExclusionsRegexpScannerTest/file-with-double-regexp-twice.txt").toURI()), UTF_8);
Set<LineRange> lineRanges = Sets.newHashSet();
lineRanges.add(new LineRange(21, 25));
lineRanges.add(new LineRange(29, 33));
verify(patternsInitializer).getPatternMatcher();
verify(patternMatcher, times(1)).addPatternToExcludeLines(javaFile, lineRanges);
verifyNoMoreInteractions(patternsInitializer);
}