void () { initRepositories("foo", "bar"); VcsTaskHandler handler = VcsTaskHandler.getAllHandlers(getProject())[0]; VcsTaskHandler.TaskInfo[] tasks = handler.getAllExistingTasks(); assertEquals(1, tasks.length); VcsTaskHandler.TaskInfo defaultTask = tasks[0]; assertEquals(1, handler.getCurrentTasks().length); VcsTaskHandler.TaskInfo task = handler.startNewTask("new"); assertEquals(2, handler.getAllExistingTasks().length); assertEquals(1, handler.getCurrentTasks().length); handler.closeTask(task, defaultTask); VcsTaskHandler.TaskInfo[] existingTasks = handler.getAllExistingTasks(); assertEquals(Arrays.asList(existingTasks).toString(), 1, existingTasks.length); assertEquals(1, handler.getCurrentTasks().length); }