void () { myFixture.addClass(""" package org.junit.runner; public @interface RunWith { Class<? extends Runner> value(); }"""); myFixture.addClass("package org.junit.runners; public class Parameterized {}"); final PsiClass testClass = myFixture.addClass(""" import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @RunWith(Parameterized.class) public class MyTest { @Test public void testName1() {} }"""); final Project project = getProject(); final GlobalSearchScope searchScope = GlobalSearchScope.projectScope(project); final JavaTestLocator locationProvider = JavaTestLocator.INSTANCE; final SMTestProxy rootProxy = new SMTestProxy("MyTest", true, "java:suite://MyTest"); rootProxy.setLocator(locationProvider); final SMTestProxy proxyParam = new SMTestProxy("[0.java]", true, "java:suite://MyTest.[0.java]"); proxyParam.setLocator(locationProvider); final SMTestProxy parameterizedTestProxy = new SMTestProxy("testName1[0.java]", false, "java:test://MyTest/testName1[0.java]"); parameterizedTestProxy.setLocator(locationProvider); final Location rootLocation = rootProxy.getLocation(project, searchScope); assertNotNull(rootLocation); assertEquals(testClass, rootLocation.getPsiElement()); final Location proxyParamLocation = proxyParam.getLocation(project, searchScope); assertNotNull(proxyParamLocation); assertInstanceOf(proxyParamLocation, PsiMemberParameterizedLocation.class); assertEquals("[0.java]", ((PsiMemberParameterizedLocation)proxyParamLocation).getParamSetName()); assertEquals(testClass, proxyParamLocation.getPsiElement()); final Location parameterizedTestProxyLocation = parameterizedTestProxy.getLocation(project, searchScope); assertNotNull(parameterizedTestProxyLocation); assertInstanceOf(parameterizedTestProxyLocation, PsiMemberParameterizedLocation.class); assertEquals("[0.java]", ((PsiMemberParameterizedLocation)parameterizedTestProxyLocation).getParamSetName()); assertEquals(testClass.getMethods()[0], parameterizedTestProxyLocation.getPsiElement()); assertEquals(testClass, ((PsiMemberParameterizedLocation)parameterizedTestProxyLocation).getContainingClass()); assertEquals("MyTest,testName1[0.java]", TestMethods.getTestPresentation(parameterizedTestProxy, project, searchScope)); }