void () { final PsiClass aClass = myFixture.addClass("package a; public class ATest {" + " @org.testng.annotations.Test()\n" + " public void testTwo(){}\n " + " @org.testng.annotations.Test(dependsOnMethods = \"testTwo\")\n" + " public void testOne(String s){}\n" + //parameterized "}"); final LinkedHashMap<PsiClass, Map<PsiMethod, List<String>>> classes = new LinkedHashMap<>(); classes.put(aClass, new HashMap<>()); final GlobalSearchScope projectScope = GlobalSearchScope.projectScope(getProject()); final SMTestProxy testProxy = new SMTestProxy("testOne", false, "java:test://a.ATest.testOne[a]"); testProxy.setLocator(new JavaTestLocator()); RerunFailedTestsAction.includeFailedTestWithDependencies(classes, projectScope, getProject(), testProxy); assertEquals(1, classes.size()); final Map<PsiMethod, List<String>> params = classes.get(aClass); assertContainsElements(params.keySet(), aClass.getMethods()); final List<String> paramsToRerun = params.get(aClass.findMethodsByName("testOne", false)[0]); assertEquals(1, paramsToRerun.size()); assertContainsElements(paramsToRerun, "a"); }