@BeforeClass
  public static void startMetaStoreServer() throws Exception {

    Configuration metastoreConf = MetastoreConf.newMetastoreConf();
    MetastoreConf.setClass(metastoreConf, ConfVars.EXPRESSION_PROXY_CLASS,
      MockPartitionExpressionForMetastore.class, PartitionExpressionProxy.class);
    MetaStoreTestUtils.setConfForStandloneMode(metastoreConf);
    msPort = MetaStoreTestUtils.startMetaStoreWithRetry(metastoreConf);
    conf = MetastoreConf.newMetastoreConf();
    MetastoreConf.setVar(conf, ConfVars.THRIFT_URIS, "thrift://localhost:" + msPort);
    MetastoreConf.setLongVar(conf, ConfVars.THRIFT_CONNECTION_RETRIES, 3);
    MetastoreConf.setBoolVar(conf, ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
    MetastoreConf.setClass(conf, ConfVars.EXPRESSION_PROXY_CLASS,
        MockPartitionExpressionForMetastore.class, PartitionExpressionProxy.class);
  }
Test to check PartitionSpec support in HiveMetaStore.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStorePartitionSpecs.java