final String second = "second";
handler.startNewTask(second);
assertEquals(3, repository.getBranches().getLocalBranches().size());</BUG>
assertEquals(second, repository.getCurrentBranch().getName());
<BUG>handler.switchTask(first);
</BUG>
assertEquals(first, repository.getCurrentBranch().getName());
<BUG>handler.closeTask(second);
</BUG>
assertEquals(2, repository.getBranches().getLocalBranches().size());

final String second = "second";
VcsTaskHandler.TaskInfo secondInfo = handler.startNewTask(second);
assertEquals(3, repository.getBranches().getLocalBranches().size());
assertEquals(second, repository.getCurrentBranch().getName());
handler.switchToTask(firstInfo);
assertEquals(first, repository.getCurrentBranch().getName());
handler.closeTask(secondInfo);
assertEquals(2, repository.getBranches().getLocalBranches().size());
