@Test
  public void testDatabaseCreateTime() throws Exception {
    // create db without specifying createtime
    Database testDb =
        new DatabaseBuilder().setName("test_create_time").create(client, metaStore.getConf());
    Database database = client.getDatabase("test_create_time");
    Assert.assertTrue("Database create time should have been set",
        database.getCreateTime() > 0);
  }
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