public static List<JobDataNodeLine> convertDataNodesToLines(final Map<String, List<DataNode>> actualDataNodes) {
        List<Pair<String, JobDataNodeLine>> result = new LinkedList<>();
        for (Entry<String, Map<String, List<DataNode>>> entry : groupDataSourceDataNodesMapByDataSourceName(actualDataNodes).entrySet()) {
            result.add(Pair.of(entry.getKey(), new JobDataNodeLine(getJobDataNodeEntries(entry.getValue()))));
        }
        // Sort by dataSourceName, make sure data node lines have the same ordering
        result.sort(Entry.comparingByKey());
        return result.stream().map(Pair::getValue).collect(Collectors.toList());
    }
@Test
    void assertConvertDataNodesToLinesWithMultipleDataSource() {
        List<DataNode> dataNodes = Arrays.asList(new DataNode("ds_0", "t_order_0"), new DataNode("ds_0", "t_order_2"), new DataNode("ds_1", "t_order_1"), new DataNode("ds_1", "t_order_3"));
        List<JobDataNodeLine> jobDataNodeLines = JobDataNodeLineConvertUtils.convertDataNodesToLines(Collections.singletonMap("t_order", dataNodes));
        assertThat(jobDataNodeLines.size(), is(2));
        JobDataNodeEntry jobDataNodeEntry = jobDataNodeLines.get(0).getEntries().iterator().next();
        assertThat(jobDataNodeEntry.getDataNodes().stream().map(DataNode::getTableName).collect(Collectors.toList()), is(Arrays.asList("t_order_0", "t_order_2")));
        jobDataNodeEntry = jobDataNodeLines.get(1).getEntries().iterator().next();
        assertThat(jobDataNodeEntry.getDataNodes().stream().map(DataNode::getTableName).collect(Collectors.toList()), is(Arrays.asList("t_order_1", "t_order_3")));
    }