void () { PsiClass aClass = myFixture.addClass("package a; @org.testng.annotations.Test " + "public class MyTestClass {" + "public MyTetClass(String defaultName){}\n" + " public void testOne(){}" + "}"); Project project = getProject(); TestClassFilter classFilter = new TestClassFilter(GlobalSearchScope.projectScope(project), project, false, true); assertTrue(classFilter.isAccepted(aClass)); }