void () { Repository repository = initRepository("foo"); LocalTask defaultTask = myTaskManager.getActiveTask(); assertNotNull(defaultTask); assertEquals(0, defaultTask.getBranches().size()); LocalTaskImpl foo = myTaskManager.createLocalTask("foo"); LocalTask localTask = myTaskManager.activateTask(foo, false); myTaskManager.createBranch(localTask, defaultTask, myTaskManager.suggestBranchName(localTask), null); repository.update(); assertEquals(2, localTask.getBranches().size()); assertEquals(1, defaultTask.getBranches().size()); myTaskManager.activateTask(localTask, false); LocalTaskImpl bar = myTaskManager.createLocalTask("bar"); LocalTask barTask = myTaskManager.activateTask(bar, false); myTaskManager.createBranch(localTask, defaultTask, myTaskManager.suggestBranchName(barTask), null); repository.update(); assertEquals(1, defaultTask.getBranches().size()); }