PsiMethod (String classFileName, String... testDataFiles) { myFixture.configureByFiles(classFileName); for (String file : testDataFiles) { myFixture.copyFileToProject(file, RESOURCES_ROOT_NAME + "/" + file); } PsiMethod testMethod = PsiTreeUtil.getParentOfType(myFixture.getElementAtCaret(), PsiMethod.class, false); assertNotNull(testMethod); return testMethod; }