void (@NotNull String newName) { String testName = getTestName(true); String answerFilePath = getTestDataPath() + testName + ".conflicts.txt"; myFixture.configureByFile(testName + ".yml"); try { myFixture.renameElementAtCaret(newName); fail("Expected conflicts: \n" + FileUtil.loadFile(new File(answerFilePath))); } catch (BaseRefactoringProcessor.ConflictsInTestsException e) { // exception expected assertSameLinesWithFile(answerFilePath, e.getMessage()); } catch (IOException e) { throw new RuntimeException(e); } }