@Test
    public void testConcatNormal() {
        Assert.assertEquals(
                "a|b|c|d",
                StringUtils.concatCsv(new String[]{"a", "b", "c", "d"}, '|', null, null));

        Assert.assertEquals(
                "a|\\|b|c|d",
                StringUtils.concatCsv(new String[]{"a", "|b", "c", "d"}, '|', '\\', null));

        Assert.assertEquals(
                "a|\\\\b|c|d",
                StringUtils.concatCsv(new String[]{"a", "\\b", "c", "d"}, '|', '\\', null));

        Assert.assertEquals(
                "a|\\\"b|c|d",
                StringUtils.concatCsv(new String[]{"a", "\"b", "c", "d"}, '|', '\\', '\"'));

        Assert.assertEquals(
                "a|\"|\"b|c|d",
                StringUtils.concatCsv(new String[]{"a", "|b", "c", "d"}, '|', null, '\"'));
    }
Unit tests for csv splitting and concating.
inlong-sort/sort-formats/format-row/format-csv/src/test/java/org/apache/inlong/sort/formats/csv/CsvUtilsTest.java