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 assertConvertDataNodesToLines() {
        Map<String, List<DataNode>> mockDataNodes = new LinkedHashMap<>(2, 1F);
        List<DataNode> dataNodes = Arrays.asList(new DataNode("ds_0", "t_order_0"), new DataNode("ds_0", "t_order_1"));
        List<DataNode> itemDataNodes = Collections.singletonList(new DataNode("ds_0", "t_order_item_0"));
        mockDataNodes.put("t_order", dataNodes);
        mockDataNodes.put("t_order_item", itemDataNodes);
        List<JobDataNodeLine> jobDataNodeLines = JobDataNodeLineConvertUtils.convertDataNodesToLines(mockDataNodes);
        assertThat(jobDataNodeLines.size(), is(1));
        List<JobDataNodeEntry> actualNodeEntry = new ArrayList<>(jobDataNodeLines.get(0).getEntries());
        assertThat(actualNodeEntry.get(0).getLogicTableName(), is("t_order"));
        assertThat(actualNodeEntry.get(0).getDataNodes().size(), is(2));
        assertThat(actualNodeEntry.get(1).getLogicTableName(), is("t_order_item"));
        assertThat(actualNodeEntry.get(1).getDataNodes().size(), is(1));
    }