void () { PsiFile file = myFixture.configureByText("A.java", """ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.util.*; @RunWith(Parameterized.class) public class A { @Parameterized.Parameters public static Collection<Object[]> data() { return Arrays.asList(new Object[] {"11"}, new Object[] {"12"}); } @Parameterized.Parameter public String myJUnitVersion; @Test public void ignoredTestMethod() throws Exception {} public class Foo { public void testMe() {} } } """); PsiClass aClass = ((PsiClassOwner)file).getClasses()[0]; TestFramework framework = TestFrameworks.detectFramework(aClass); assertNotNull(framework); assertTrue(framework.isTestClass(aClass)); PsiClass innerClass = aClass.getInnerClasses()[0]; assertFalse(framework.isTestClass(innerClass)); assertFalse(framework.isTestMethod(innerClass.getMethods()[0])); }