@Test
  public void testDropDatabaseDeleteData() throws Exception {
    Database database = testDatabases[0];
    Path dataFile = new Path(database.getLocationUri() + "/dataFile");
    metaStore.createFile(dataFile, "100");

    // Do not delete the data
    client.dropDatabase(database.getName(), false, false);
    // Check that the data still exist
    Assert.assertTrue("The data file should still exist", metaStore.isPathExists(dataFile));

    // Recreate the database
    client.createDatabase(database);
    Assert.assertTrue("The data file should still exist", metaStore.isPathExists(dataFile));

    // Delete the data
    client.dropDatabase(database.getName(), true, false);
    // Check that the data is removed
    Assert.assertFalse("The data file should not exist", metaStore.isPathExists(dataFile));
  }
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