### Question:
HadoopCatalog extends BaseMetastoreCatalog implements Closeable, SupportsNamespaces { @Override public void renameTable(TableIdentifier from, TableIdentifier to) { throw new UnsupportedOperationException("Cannot rename Hadoop tables"); } HadoopCatalog(String name, Configuration conf, String warehouseLocation);  HadoopCatalog(Configuration conf, String warehouseLocation);  HadoopCatalog(Configuration conf); @Override String name(); @Override List<TableIdentifier> listTables(Namespace namespace); @Override boolean dropTable(TableIdentifier identifier, boolean purge); @Override void renameTable(TableIdentifier from, TableIdentifier to); @Override void createNamespace(Namespace namespace, Map<String, String> meta); @Override List<Namespace> listNamespaces(Namespace namespace); @Override boolean dropNamespace(Namespace namespace); @Override boolean setProperties(Namespace namespace,  Map<String, String> properties); @Override boolean removeProperties(Namespace namespace,  Set<String> properties); @Override Map<String, String> loadNamespaceMetadata(Namespace namespace); @Override void close(); @Override String toString(); @Override TableBuilder buildTable(TableIdentifier identifier, Schema schema);  }### Answer:
@Test public void testRenameTable() throws Exception { Configuration conf = new Configuration(); String warehousePath = temp.newFolder().getAbsolutePath(); HadoopCatalog catalog = new HadoopCatalog(conf, warehousePath); TableIdentifier testTable = TableIdentifier.of("db", "tbl1"); catalog.createTable(testTable, SCHEMA, PartitionSpec.unpartitioned()); AssertHelpers.assertThrows("should throw exception", UnsupportedOperationException.class, "Cannot rename Hadoop tables", () -> { catalog.renameTable(testTable, TableIdentifier.of("db", "tbl2")); } ); }