@Test
    public void testMarshallAndDemarshall() throws Exception {

        Collection<FormatInfo> formatInfos = createFormatInfos();

        for (FormatInfo formatInfo : formatInfos) {
            String json = FormatUtils.marshall(formatInfo);
            FormatInfo actualFormatInfo = FormatUtils.demarshall(json);
            assertEquals(formatInfo, actualFormatInfo);
        }
    }
Verify that format information can be correctly marshalled and
demarshalled.
inlong-sort/sort-formats/format-common/src/test/java/org/apache/inlong/sort/formats/common/FormatInfoTestBase.java