@Test
    public void testListener() {
        WorkflowContext context = new WorkflowContext();
        GroupResourceProcessForm groupResourceForm = new GroupResourceProcessForm();
        context.setProcessForm(groupResourceForm);
        InlongPulsarInfo pulsarInfo = new InlongPulsarInfo();
        pulsarInfo.setInlongGroupId("1");
        groupResourceForm.setGroupInfo(pulsarInfo);

        List<InlongGroupExtInfo> inlongGroupExtInfos = new ArrayList<>();
        InlongGroupExtInfo inlongGroupExtInfo1 = new InlongGroupExtInfo();
        inlongGroupExtInfo1.setKeyName(InlongConstants.SORT_URL);
        inlongGroupExtInfo1.setKeyValue("127.0.0.1:8085");
        inlongGroupExtInfos.add(inlongGroupExtInfo1);

        InlongGroupExtInfo inlongGroupExtInfo2 = new InlongGroupExtInfo();
        inlongGroupExtInfo2.setKeyName(InlongConstants.SORT_PROPERTIES);
        Map<String, String> sortProperties = new HashMap<>(16);
        String sortStr = JsonUtils.toJsonString(sortProperties);
        inlongGroupExtInfo2.setKeyValue(sortStr);
        inlongGroupExtInfos.add(inlongGroupExtInfo2);

        InlongGroupExtInfo inlongGroupExtInfo5 = new InlongGroupExtInfo();
        inlongGroupExtInfo5.setKeyName(InlongConstants.DATAFLOW);
        inlongGroupExtInfo5.setKeyValue("{\"streamId\":{\n"
                + "    \"id\": 1,\n"
                + "    \"source_info\":\n"
                + "    {\n"
                + "        \"type\": \"pulsar\",\n"
                + "        \"admin_url\": \"http://127.0.0.1:8080\",\n"
                + "        \"service_url\": \"pulsar://127.0.0.1:6650\",\n"
                + "        \"topic\": \"persistent://pzr/pzr/pzr-topic\",\n"
                + "        \"subscription_name\": \"subscriptionName\",\n"
                + "        \"deserialization_info\":\n"
                + "        {\n"
                + "            \"type\": \"debezium_json\",\n"
                + "            \"ignore_parse_errors\": true,\n"
                + "            \"timestamp_format_standard\": \"ISO_8601\"\n"
                + "        },\n"
                + "        \"fields\":\n"
                + "        [\n"
                + "            {\n"
                + "                \"name\": \"name\",\n"
                + "                \"type\":\"base\",\n"
                + "                \"format_info\":\n"
                + "                {\n"
                + "                    \"type\": \"string\"\n"
                + "                }\n"
                + "            },\n"
                + "            {\n"
                + "            \t\"type\":\"base\",\n"
                + "                \"name\": \"age\",\n"
                + "                \"format_info\":\n"
                + "                {\n"
                + "                    \"type\": \"int\"\n"
                + "                }\n"
                + "            }\n"
                + "        ],\n"
                + "        \"authentication\": null\n"
                + "    },\n"
                + "    \"transformation_info\":\n"
                + "    {\n"
                + "         \"transform_rule\":\n"
                + "             {\n"
                + "                 \"type\":\"field_mapping\",\n"
                + "                 \"field_mapping_units\":\n"
                + "                     [\n"
                + "                         {\n"
                + "                             \"source_field\":\n"
                + "                                 {\n"
                + "                                     \"type\":\"base\",\n"
                + "                                     \"name\":\"age\",\n"
                + "                                     \"format_info\":\n"
                + "                                         {\n"
                + "                                             \"type\":\"int\"\n"
                + "                                         }\n"
                + "                                 },\n"
                + "                             \"sink_field\":\n"
                + "                                 {\n"
                + "                                     \"type\":\"base\",\n"
                + "                                     \"name\":\"age\",\n"
                + "                                     \"format_info\":\n"
                + "                                         {\n"
                + "                                             \"type\":\"int\"\n"
                + "                                         }\n"
                + "                                 }\n"
                + "                     },\n"
                + "                     {\n"
                + "                         \"source_field\":\n"
                + "                             {\n"
                + "                                 \"type\":\"base\",\n"
                + "                                 \"name\":\"name\",\n"
                + "                                 \"format_info\":\n"
                + "                                     {\n"
                + "                                         \"type\":\"string\"\n"
                + "                                     }\n"
                + "                             },\n"
                + "                         \"sink_field\":\n"
                + "                             {\n"
                + "                                 \"type\":\"base\",\n"
                + "                                 \"name\":\"name\",\n"
                + "                                 \"format_info\":\n"
                + "                                     {\n"
                + "                                         \"type\":\"string\"\n"
                + "                                     }\n"
                + "                             }\n"
                + "                     }\n"
                + "                 ]\n"
                + "         }\n"
                + "    },\n"
                + "    \"sink_info\":\n"
                + "    {\n"
                + "        \"type\": \"hive\",\n"
                + "        \"fields\":\n"
                + "        [\n"
                + "            {\n"
                + "            \t\"type\":\"base\",\n"
                + "                \"name\": \"name\",\n"
                + "                \"format_info\":\n"
                + "                {\n"
                + "                    \"type\": \"string\"\n"
                + "                }\n"
                + "            },\n"
                + "            {\n"
                + "                \"type\":\"base\",\n"
                + "                \"name\": \"age\",\n"
                + "                \"format_info\":\n"
                + "                {\n"
                + "                    \"type\": \"int\"\n"
                + "                }\n"
                + "            }\n"
                + "        ],\n"
                + "        \"hive_server_jdbc_url\": \"jdbc:hive2://127.0.0.1:10000\",\n"
                + "        \"database\": \"inlong_test\",\n"
                + "        \"table\": \"pzr\",\n"
                + "        \"username\": \"testUsername\",\n"
                + "        \"password\": \"testPassword\",\n"
                + "        \"data_path\": \"hdfs://127.0.0.1:8020\",\n"
                + "        \"partitions\":\n"
                + "        [],\n"
                + "        \"file_format\":\n"
                + "        {\n"
                + "            \"type\": \"text\",\n"
                + "            \"splitter\": \"|\"\n"
                + "        }\n"
                + "    },\n"
                + "    \"properties\":\n"
                + "    {\n"
                + "        \"pulsar.source.consumer.bootstrap-mode\": \"earliest\"\n"
                + "    }\n"
                + "}}");
        inlongGroupExtInfos.add(inlongGroupExtInfo5);
        pulsarInfo.setExtList(inlongGroupExtInfos);

        StartupSortListener startupSortListener = new StartupSortListener();
        // This method temporarily fails the test, so comment it out first
        // startupSortListener.listen(context);
    }
Test class for start up sort listener.
inlong-manager/manager-plugins/base/src/test/java/org/apache/inlong/manager/plugin/listener/StartupSortListenerTest.java