void () { TaskTestUtil.TaskBuilder task = new TaskTestUtil.TaskBuilder("IDEA-666", "Bad news", null); TaskManagerImpl taskManager = myTaskManager; assertEquals("IDEA-666", taskManager.suggestBranchName(task)); String format = taskManager.getState().branchNameFormat; try { taskManager.getState().branchNameFormat = "feature/{id}"; assertEquals("feature/IDEA-666", taskManager.suggestBranchName(task)); taskManager.getState().branchNameFormat = "{id}_{summary}"; assertEquals("IDEA-666_Bad-news", taskManager.suggestBranchName(task)); } finally { taskManager.getState().branchNameFormat = format; } }