@Deprecated
    public static List<CatalogTable> getCatalogTables(
            ReadonlyConfig readonlyConfig, ClassLoader classLoader) {

        // We use plugin_name as factoryId, so MySQL-CDC should be MySQL
        String factoryId = readonlyConfig.get(CommonOptions.PLUGIN_NAME).replace("-CDC", "");
        return getCatalogTables(factoryId, readonlyConfig, classLoader);
    }
@Test
    public void testCatalogUtilGetCatalogTable() throws FileNotFoundException, URISyntaxException {
        String path = getTestConfigFile("/conf/getCatalogTable.conf");
        Config config = ConfigFactory.parseFile(new File(path));
        Config source = config.getConfigList("source").get(0);
        ReadonlyConfig sourceReadonlyConfig = ReadonlyConfig.fromConfig(source);
        List<CatalogTable> catalogTables =
                CatalogTableUtil.getCatalogTables(
                        sourceReadonlyConfig, Thread.currentThread().getContextClassLoader());
        Assertions.assertEquals(2, catalogTables.size());
        Assertions.assertEquals(
                TableIdentifier.of("InMemory", TablePath.of("st.public.table1")),
                catalogTables.get(0).getTableId());
        Assertions.assertEquals(
                TableIdentifier.of("InMemory", TablePath.of("st.public.table2")),
                catalogTables.get(1).getTableId());
        // test empty tables
        Config emptyTableSource =
                source.withValue(
                        TABLE_NAMES.key(), ConfigValueFactory.fromIterable(new ArrayList<>()));
        ReadonlyConfig emptyReadonlyConfig = ReadonlyConfig.fromConfig(emptyTableSource);
        Assertions.assertThrows(
                SeaTunnelException.class,
                () ->
                        CatalogTableUtil.getCatalogTables(
                                emptyReadonlyConfig,
                                Thread.currentThread().getContextClassLoader()));
        // test unknown catalog
        Config cannotFindCatalogSource =
                source.withValue(PLUGIN_NAME, ConfigValueFactory.fromAnyRef("unknownCatalog"));
        ReadonlyConfig cannotFindCatalogReadonlyConfig =
                ReadonlyConfig.fromConfig(cannotFindCatalogSource);
        Assertions.assertThrows(
                SeaTunnelException.class,
                () ->
                        CatalogTableUtil.getCatalogTables(
                                cannotFindCatalogReadonlyConfig,
                                Thread.currentThread().getContextClassLoader()));
    }