void (@Nullable String newName) { configureByFile(getTestName(true) + "-before.sh"); TemplateManagerImpl.setTemplateTesting(getTestRootDisposable()); executeRenameAction(newName != null); TemplateState templateState = TemplateManagerImpl.getTemplateState(getEditor()); if (newName != null) { assertNotNull(templateState); } else { assertNull(templateState); return; } assertFalse(templateState.isFinished()); type(newName); templateState.gotoEnd(); checkResultByFile(getTestName(true) + "-after.sh"); doTestWithPlainTextRenamer(newName); }