void () { myFixture.addClass(""" public class TestClass { public static class Tests extends junit.framework.TestCase { public void testFoo() throws Exception {} } }"""); final SMTestProxy testProxy = new SMTestProxy("testFoo", false, "java:test://TestClass$Tests/testFoo"); final Project project = getProject(); final GlobalSearchScope searchScope = GlobalSearchScope.projectScope(project); testProxy.setLocator(JavaTestLocator.INSTANCE); Location location = testProxy.getLocation(project, searchScope); assertNotNull(location); PsiElement element = location.getPsiElement(); assertTrue(element instanceof PsiMethod); String name = ((PsiMethod)element).getName(); assertEquals("testFoo", name); }