PsiElement (@NotNull RunDashboardRunConfigurationNode node) { RunConfiguration runConfiguration = node.getConfigurationSettings().getConfiguration(); if (!(runConfiguration instanceof JUnitConfiguration jUnitConfiguration)) return null; String runClassName = jUnitConfiguration.getRunClass(); if (runClassName == null) return null; PsiClass runClass = jUnitConfiguration.getConfigurationModule().findClass(runClassName); if (runClass == null) return null; String testMethod = jUnitConfiguration.getPersistentData().getMethodName(); if (testMethod != null) { PsiMethod[] methods = runClass.findMethodsByName(testMethod, false); if (methods.length > 0) { return methods[0]; } } return runClass; }