void (@NotNull String fileName, Surrounder surrounder, @Nullable String textToType) { TemplateManagerImpl.setTemplateTesting(getTestRootDisposable()); configureByFile(BASE_PATH + fileName + ".java"); SurroundWithHandler.invoke(getProject(), getEditor(), getFile(), surrounder); if (textToType != null) { type(textToType); } TemplateState templateState = TemplateManagerImpl.getTemplateState(getEditor()); assertNotNull(templateState); templateState.nextTab(); checkResultByFile(BASE_PATH + fileName + "_after.java"); }