@Test
    @SuppressWarnings("unchecked")
    public void testSerialize() throws JsonProcessingException {
        String serializeStr = objectMapper.writeValueAsString(testObject);
        T expected = (T) objectMapper.readValue(serializeStr, testObject.getClass());
        assertEquals(expected, testObject);
    }
Test serialize

@throws JsonProcessingException The exception may throws when execute the method
inlong-sort/sort-common/src/test/java/org/apache/inlong/sort/SerializeBaseTest.java