private Database getDatabaseWithAllParametersSet() throws Exception {
    return new DatabaseBuilder()
               .setName("dummy")
               .setOwnerType(PrincipalType.ROLE)
               .setOwnerName("owner")
               .setLocation(metaStore.getExternalWarehouseRoot() + "/database_location")
               .setDescription("dummy description")
               .addParam("param_key_1", "param_value_1")
               .addParam("param_key_2", "param_value_2")
               .build(metaStore.getConf());
  }
This test creates and queries a database and then drops it. Good for testing the happy path.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java