void (File wc1, final File created) { assertTrue(wc1.isDirectory()); final VirtualFile vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(wc1); final UpdatedFiles files = UpdatedFiles.create(); final UpdateSession session = vcs.getUpdateEnvironment().updateDirectories(new FilePath[]{VcsUtil.getFilePath(vf)}, files, new EmptyProgressIndicator(), new Ref<>()); assertTrue(session.getExceptions().isEmpty()); assertFalse(session.isCanceled()); assertFalse(files.getGroupById(FileGroup.CREATED_ID).getFiles().isEmpty()); final String path = files.getGroupById(FileGroup.CREATED_ID).getFiles().iterator().next(); final String name = path.substring(path.lastIndexOf(File.separator) + 1); assertEquals(created.getName(), name); }