List<TestTasksToRun> ( @NotNull ConfigurationContext context, @NotNull PsiClass element, @NotNull List<? extends PsiClass> chosenElements ) { Project project = Objects.requireNonNull(context.getProject()); VirtualFile source = Objects.requireNonNull(element.getContainingFile().getVirtualFile()); List<? extends PsiClass> elements = chosenElements.isEmpty() ? List.of(element) : chosenElements; List<TestTasksToRun> testsTasksToRun = new ArrayList<>(); for (PsiClass psiClass : elements) { String testFilter = createTestFilterFrom(psiClass); testsTasksToRun.addAll(ContainerUtil.map(findAllTestsTaskToRun(source, project), it -> new TestTasksToRun(it, testFilter))); } return testsTasksToRun; }