String (JUnitConfiguration configuration) { JUnitConfiguration.Data data = configuration.getPersistentData(); if (data == null) return null; final GlobalSearchScope globalSearchScope = TestObject.getScopeForJUnit(configuration); boolean isMethodConfiguration = JUnitConfiguration.TEST_METHOD.equals(data.TEST_OBJECT); boolean isClassConfiguration = JUnitConfiguration.TEST_CLASS.equals(data.TEST_OBJECT); final PsiClass psiClass = isMethodConfiguration || isClassConfiguration ? JavaExecutionUtil.findMainClass(configuration.getProject(), data.getMainClassName(), globalSearchScope) : null; if (psiClass == null) return null; String disabledCondition = getDisabledCondition(psiClass); if (disabledCondition != null) { return disabledCondition; } String methodName = data.getMethodName(); if (methodName != null) { final JUnitUtil.TestMethodFilter filter = new JUnitUtil.TestMethodFilter(psiClass); String currentSignature = data.getMethodNameWithSignature(); for (PsiMethod t : psiClass.findMethodsByName(methodName, true)) { if (filter.value(t) && Objects.equals(currentSignature, JUnitConfiguration.Data.getMethodPresentation(t))) { return getDisabledCondition(t); } } } return null; }