@Test
  public void testCustomRDBMS() throws Exception {
    MetastoreConf.setBoolVar(conf, ConfVars.USE_CUSTOM_RDBMS, true);
    MetastoreConf.setVar(conf, ConfVars.CUSTOM_RDBMS_CLASSNAME, DummyCustomRDBMS.class.getName());
    DatabaseProduct.reset();
    DatabaseProduct db = DatabaseProduct.determineDatabaseProduct(DatabaseProduct.UNDEFINED_NAME, conf);
    
    Assert.assertEquals(db.getHiveSchemaPostfix(), "DummyPostfix");
    Assert.assertEquals(db.getDBTime(), "values current_timestamp");

    Configuration c = db.getConf();
    Assert.assertEquals(c.get("DummyKey"), "DummyValue");
    //Cleanup conf
    MetastoreConf.setBoolVar(conf, ConfVars.USE_CUSTOM_RDBMS, false);
    MetastoreConf.setVar(conf, ConfVars.CUSTOM_RDBMS_CLASSNAME, "");
  }
Verify queries can run against Derby DB.
 As long as Derby doesn't complain, we assume the query is syntactically/semantically correct.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/txn/TestTxnUtils.java