void (LocalChangeList changeList, List<Change> changes) { String commitMessage = changeList.getName(); CheckinProjectPanel panel = EasyMock.createMock(CheckinProjectPanel.class); EasyMock.expect(panel.getProject()).andReturn(getProject()); EasyMock.expect(panel.getCommitMessage()).andReturn(commitMessage); EasyMock.replay(panel); CheckinHandler checkinHandler = new TaskCheckinHandlerFactory().createHandler(panel, new CommitContext()); ChangeListCommitState commitState = new ChangeListCommitState(changeList, changes, commitMessage); LocalChangesCommitter committer = SingleChangeListCommitter.create(getProject(), commitState, new CommitContext(), "Commit"); committer.addResultHandler(new CheckinHandlersNotifier(committer, singletonList(checkinHandler))); committer.runCommit("Commit", true); EDT.dispatchAllInvocationEvents(); // wait com.intellij.vcs.commit.Committer.finishCommit }