void (Configuration template, String source, LanguageFileType fileType, Function<? super PsiElement, String> resultConverter, String... expectedResults) { if (!(template instanceof SearchConfiguration)) fail(); final SearchConfiguration searchConfiguration = (SearchConfiguration)template; options = searchConfiguration.getMatchOptions(); final Matcher matcher = new Matcher(getProject(), options); final List<MatchResult> matches = matcher.testFindMatches(source, true, fileType, false); final List<String> actualResults = ContainerUtil.map(matches, result -> resultConverter.apply(result.getMatch())); assertEquals(template.getName() , List.of(expectedResults), actualResults); }