TestMappings (@NotNull Project project, @NotNull List<String> tests) { Map<String, PsiClass> classes = new LinkedHashMap<>(); Map<String, String> methods = new LinkedHashMap<>(); JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project); GlobalSearchScope projectScope = GlobalSearchScope.projectScope(project); for (String test : tests) { int i = StringUtil.indexOf(test, ","); String className = i < 0 ? test : test.substring(0, i); PsiClass psiClass = psiFacade.findClass(className, projectScope); classes.put(test, psiClass); String method = i != -1 && test.length() > i + 1 ? test.substring(i + 1) : null; methods.put(test, method); } return new TestMappings(classes, methods); }