@Test
  public void testDropDatabaseWithTableCascade() throws Exception {
    Database database = testDatabases[0];
    Table testTable =
        new TableBuilder()
            .setDbName(database.getName())
            .setTableName("test_table")
            .addCol("test_col", "int")
            .create(client, metaStore.getConf());

    client.dropDatabase(database.getName(), true, true, true);
    Assert.assertFalse("The directory should be removed",
        metaStore.isPathExists(new Path(database.getLocationUri())));
  }
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