void () { createClass("package pack; public interface Foo<T> {void foo(T t};"); String path = "/template"; TemplateManagerImpl.setTemplateTesting(myFixture.getTestRootDisposable()); configureByFile(path + "/before1.java"); selectItem(myItems[0]); TemplateState state = TemplateManagerImpl.getTemplateState(myFixture.getEditor()); type("String"); assert state != null; state.gotoEnd(false); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); checkResultByFile(path + "/after1.java"); configureByFile(path + "/before2.java"); selectItem(myItems[0]); assert TemplateManagerImpl.getTemplateState(myFixture.getEditor()) == null; NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); checkResultByFile(path +"/after2.java"); configureByFile(path + "/before3.java"); selectItem(myItems[0]); assert TemplateManagerImpl.getTemplateState(myFixture.getEditor()) == null; NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); checkResultByFile(path +"/after3.java"); }