@Override
    public List<Catalogue> sort(List<Catalogue> catalogueTree, SortTypeEnum sortTypeEnum) {
        log.debug(
                "sort catalogue tree based on first letter. catalogueTree: {}, sortTypeEnum: {}",
                catalogueTree,
                sortTypeEnum);
        Collator collator = Collator.getInstance(Locale.CHINA);
        return recursionSortCatalogues(catalogueTree, sortTypeEnum, collator);
    }
@Test
    public void sortDescTest() {
        SortTypeEnum sortTypeEnum = SortTypeEnum.DESC;
        List<Catalogue> catalogueTree = Lists.newArrayList();
        Catalogue catalogue = new Catalogue();
        catalogue.setId(1);
        catalogue.setName("测试目录");
        catalogue.setCreateTime(LocalDateTime.of(2024, 4, 28, 19, 22, 0));

        Catalogue catalogue11 = new Catalogue();
        catalogue11.setId(2);
        catalogue11.setName("bbb");
        catalogue11.setCreateTime(LocalDateTime.of(2024, 4, 28, 20, 22, 0));
        Catalogue catalogue12 = new Catalogue();
        catalogue12.setId(3);
        catalogue12.setName("aaa");
        catalogue12.setCreateTime(LocalDateTime.of(2024, 4, 28, 21, 22, 0));
        catalogue.setChildren(Lists.newArrayList(catalogue12, catalogue11));

        Catalogue catalogue2 = new Catalogue();
        catalogue2.setId(4);
        catalogue2.setName("test");
        catalogue2.setCreateTime(LocalDateTime.of(2024, 4, 29, 19, 22, 0));

        Catalogue catalogue21 = new Catalogue();
        catalogue21.setId(7);
        catalogue21.setName("测试目录2");
        catalogue21.setCreateTime(LocalDateTime.of(2024, 4, 29, 21, 22, 0));
        Catalogue catalogue22 = new Catalogue();
        catalogue22.setId(6);
        catalogue22.setName("生产任务");
        catalogue22.setCreateTime(LocalDateTime.of(2024, 4, 29, 20, 22, 0));
        catalogue2.setChildren(Lists.newArrayList(catalogue21, catalogue22));

        catalogueTree.add(catalogue2);
        catalogueTree.add(catalogue);

        /*
        input:
        -- 4 (2024-04-29 19:22:00) (test)
            -- 7 (2024-04-29 21:22:00) (测试目录2)
            -- 6 (2024-04-29 20:22:00) (生产任务)
        -- 1 (2024-04-28 19:22:00) (测试目录)
            -- 3 (2024-04-28 21:22:00) (aaa)
            -- 2 (2024-04-28 20:22:00) (bbb)

        output:
        -- 1 (2024-04-28 19:22:00) (测试目录)
            -- 2 (2024-04-28 20:22:00) (bbb)
            -- 3 (2024-04-28 21:22:00) (aaa)
        -- 4 (2024-04-29 19:22:00) (test)
            -- 6 (2024-04-29 20:22:00) (生产任务)
            -- 7 (2024-04-29 21:22:00) (测试目录2)
         */
        List<Catalogue> resultList = catalogueTreeSortFirstLetterStrategyTest.sort(catalogueTree, sortTypeEnum);
        List<Integer> resultIdList = CategoryTreeSortStrategyTestUtils.breadthTraverse(resultList);
        assertEquals(Lists.newArrayList(1, 4, 2, 3, 6, 7), resultIdList);
    }