void (VirtualFile clsFile, String resultFileName) { try { PsiFileStub<?> stub = ClsFileImpl.buildFileStub(clsFile, clsFile.contentsToByteArray()); assertNotNull(stub); String actual = ((StubBase<?>)stub).printTree().trim(); File resultFile = new File(JavaTestUtil.getJavaTestDataPath() + "/psi/cls/stubBuilder/" + resultFileName); if (!resultFile.exists()) { FileUtil.writeToFile(resultFile, actual); fail("No test data found at: " + resultFile + ", creating one"); } assertSameLinesWithFile(resultFile.getPath(), actual, true); } catch (Exception e) { throw new RuntimeException(e); } }