public Optional<Table> getTable(TableName tableName) {
        return Optional.ofNullable(getTable(tableName.getCatalog(), tableName.getDb(), tableName.getTbl()));
    }
@Test
    public void testGetMetadataTable() throws Exception {
        new MockUp<IcebergHiveCatalog>() {
            @Mock
            boolean tableExists(String dbName, String tableName) {
                return true;
            }
        };

        String createIcebergCatalogStmt = "create external catalog iceberg_catalog properties (\"type\"=\"iceberg\", " +
                "\"hive.metastore.uris\"=\"thrift://hms:9083\", \"iceberg.catalog.type\"=\"hive\")";
        AnalyzeTestUtil.getStarRocksAssert().withCatalog(createIcebergCatalogStmt);
        MetadataMgr metadataMgr = AnalyzeTestUtil.getConnectContext().getGlobalStateMgr().getMetadataMgr();
        com.starrocks.catalog.Table table = metadataMgr.getTable("iceberg_catalog", "iceberg_db", "t1$logical_iceberg_metadata");
        Assert.assertTrue(table instanceof LogicalIcebergMetadataTable);
        LogicalIcebergMetadataTable metadataTable = (LogicalIcebergMetadataTable) table;
        Assert.assertEquals("iceberg_db", metadataTable.getOriginDb());
        Assert.assertEquals("t1", metadataTable.getOriginTable());
        Assert.assertEquals(LOGICAL_ICEBERG_METADATA, metadataTable.getMetadataTableType());
        Assert.assertTrue(metadataTable.isSupported());
        AnalyzeTestUtil.getStarRocksAssert().dropCatalog("iceberg_catalog");
    }