### Question:
DepartmentsSort { public Set<String> naturalOrderSort(String[] departments) { TreeSet<String> sortedDepartments = new TreeSet<>(); for (String fullString : departments) { StringBuilder department = new StringBuilder(); for (String splitString : fullString.split("\\\\")) { department.append(splitString); sortedDepartments.add(department.toString()); department.append("\\"); } } return sortedDepartments; }  Set<String> naturalOrderSort(String[] departments); TreeSet<String> reverseOrderSort(String[] departments);  }### Answer:
@Test public void ifArrayNaturalOrderSortingThenResultIsNaturalOrderSortingExpect() { DepartmentsSort testSort = new DepartmentsSort(); Set<String> result = testSort.naturalOrderSort(arrayForSorting); assertThat(result, is(new LinkedHashSet<>(asList(naturalOrderSortingExpect)))); }