void (String text) { myFixture.configureByText("a.txt", text); var commitMessage = new CommitMessage(getProject()); Disposer.register(myFixture.getTestRootDisposable(), commitMessage); myFixture.getEditor().getDocument().putUserData(CommitMessage.DATA_KEY, commitMessage); }