void () { VirtualFile vf = createFileInCommand("a.txt", null); myChangeListManager.commitFiles(vf); deleteFileInCommand(vf); myChangeListManager.commitFiles(vf); showConfirmation(VcsConfiguration.StandardConfirmation.REMOVE); vf = createFileInCommand("a.txt", null); myChangeListManager.ensureUpToDate(); final HgMockVcsHelper helper = registerMockVcsHelper(); helper.addListener(new VcsHelperListener() { @Override public void dialogInvoked() { fail("No dialog should be invoked, because newly added file should be silently removed from the repository"); } }); VcsTestUtil.deleteFileInCommand(myProject, vf); }