void () { @SuppressWarnings("TestNGDataProvider") final PsiClass aClass = myFixture.addClass(""" package a; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; public class ATest { @DataProvider public Object[][] testData() { return new Object[][]{ {1}, {2}, }; } @Test(dataProvider = "testData") public void test(int in) { assertEquals(in, 0); } } """); 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("test", false, "java:test://a.ATest.test[0]"); testProxy.setLocator(new JavaTestLocator()); RerunFailedTestsAction.includeFailedTestWithDependencies(classes, projectScope, getProject(), testProxy); final SMTestProxy testProxy2 = new SMTestProxy("test", false, "java:test://a.ATest.test[1]"); testProxy2.setLocator(new JavaTestLocator()); RerunFailedTestsAction.includeFailedTestWithDependencies(classes, projectScope, getProject(), testProxy2); assertEquals(1, classes.size()); final Map<PsiMethod, List<String>> params = classes.get(aClass); final PsiMethod[] tests = aClass.findMethodsByName("test", false); assertContainsElements(params.keySet(), tests); final List<String> paramsToRerun = params.get(tests[0]); assertEquals(2, paramsToRerun.size()); assertContainsElements(paramsToRerun, "0", "1"); }