@Test
  public void testDatabaseLocationWithSlashInWarehouseDir() {
    Configuration conf = new Configuration();
    // With a trailing slash
    conf.set("hive.metastore.warehouse.dir", "s3://bucket/");
    conf.set("hive.metastore.warehouse.external.dir", "s3://bucket/");

    HiveCatalog hiveCatalog = new HiveCatalog();
    hiveCatalog.setConf(conf);

    Database database = hiveCatalog.convertToDatabase(Namespace.of("database"), ImmutableMap.of());

    assertThat(database.getLocationUri()).isEqualTo("s3://bucket/database.db");
  }
Run all the tests from abstract of {@link CatalogTests} with few specific tests related to HIVE.
iceberg/iceberg-catalog/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java