void (String srcFileName, String resultFileName, String... options) { File out = IoTestUtil.createTestDir(new File(FileUtil.getTempDirectory()), "out"); try { File srcFile = IdeaTestUtil.findSourceFile(JavaTestUtil.getJavaTestDataPath() + "/psi/cls/stubBuilder/" + srcFileName); IdeaTestUtil.compileFile(srcFile, out, options); String clsFilePath = out.getPath() + '/' + srcFileName + ".class"; VirtualFile clsFile = LocalFileSystem.getInstance().refreshAndFindFileByPath(clsFilePath); assertNotNull("Can't find: " + clsFilePath, clsFile); doTest(clsFile, resultFileName + ".txt"); } finally { FileUtil.delete(out); } }