@Test
    public void testDeprecatedKeys() {
        Configuration cfg = new Configuration();
        cfg.setInteger("the-key", 11);
        cfg.setInteger("old-key", 12);
        cfg.setInteger("older-key", 13);

        ConfigOption<Integer> matchesFirst = ConfigOptions
                .key("the-key")
                .defaultValue(-1)
                .withDeprecatedKeys("old-key", "older-key");

        ConfigOption<Integer> matchesSecond = ConfigOptions
                .key("does-not-exist")
                .defaultValue(-1)
                .withDeprecatedKeys("old-key", "older-key");

        ConfigOption<Integer> matchesThird = ConfigOptions
                .key("does-not-exist")
                .defaultValue(-1)
                .withDeprecatedKeys("foo", "older-key");

        final ConfigOption<Integer> notContained = ConfigOptions
                .key("does-not-exist")
                .defaultValue(-1)
                .withDeprecatedKeys("not-there", "also-not-there");

        assertEquals(11, cfg.getInteger(matchesFirst));
        assertEquals(12, cfg.getInteger(matchesSecond));
        assertEquals(13, cfg.getInteger(matchesThird));
        assertEquals(-1, cfg.getInteger(notContained));
    }
This test checks the serialization/deserialization of configuration objects.
inlong-sort/sort-common/src/test/java/org/apache/inlong/sort/configuration/ConfigurationTest.java