void () { Task task = myRepository.findTask("TEST-001"); assertNotNull(task); assertTrue(task.isIssue()); assertEquals("TEST-001", myTaskManager.suggestBranchName(task)); LocalTaskImpl simple = new LocalTaskImpl("1", "simple"); assertEquals("simple", myTaskManager.suggestBranchName(simple)); LocalTaskImpl strange = new LocalTaskImpl("1", "very long and strange summary"); assertEquals("very-long", myTaskManager.suggestBranchName(strange)); assertEquals("very_long", myTaskManager.suggestBranchName(strange, "_")); myTaskManager.getState().branchNameFormat = "{id} {summary}"; LocalTaskImpl withIllegalSymbolsInIssue = new LocalTaskImpl("1", "contains Illegal$Symbols"); withIllegalSymbolsInIssue.setIssue(true); assertEquals("1-contains-Illegal$Symbols", myTaskManager.suggestBranchName(withIllegalSymbolsInIssue)); }