### Question:
MetaStoreConst { public static IMetaStore openLocalPentahoMetaStore() throws MetaStoreException { return MetaStoreConst.openLocalPentahoMetaStore( true ); }  static final String getDefaultPentahoMetaStoreLocation(); static IMetaStore openLocalPentahoMetaStore(); static IMetaStore openLocalPentahoMetaStore( boolean allowCreate ); static final String DB_ATTR_ID_DESCRIPTION; static final String DB_ATTR_ID_PLUGIN_ID; static final String DB_ATTR_ID_ACCESS_TYPE; static final String DB_ATTR_ID_HOSTNAME; static final String DB_ATTR_ID_PORT; static final String DB_ATTR_ID_DATABASE_NAME; static final String DB_ATTR_ID_USERNAME; static final String DB_ATTR_ID_PASSWORD; static final String DB_ATTR_ID_SERVERNAME; static final String DB_ATTR_ID_DATA_TABLESPACE; static final String DB_ATTR_ID_INDEX_TABLESPACE; static boolean disableMetaStore; static final String DB_ATTR_DRIVER_CLASS; static final String DB_ATTR_JDBC_URL; static final String DB_ATTR_ID_ATTRIBUTES; }### Answer:
@Test public void testOpenLocalPentahoMetaStore() throws Exception { MetaStoreConst.disableMetaStore = false; File tempDir = Files.createTempDir(); String tempPath = tempDir.getAbsolutePath(); System.setProperty( Const.PENTAHO_METASTORE_FOLDER, tempPath ); String metaFolder = tempPath + File.separator + XmlUtil.META_FOLDER_NAME; assertNotNull( MetaStoreConst.openLocalPentahoMetaStore() ); assertTrue( ( new File( metaFolder ) ).exists() ); MetaStoreConst.disableMetaStore = true; assertNull( MetaStoreConst.openLocalPentahoMetaStore() ); MetaStoreConst.disableMetaStore = false; assertNotNull( MetaStoreConst.openLocalPentahoMetaStore( false ) ); FileUtils.deleteDirectory( new File( metaFolder ) ); assertNull( MetaStoreConst.openLocalPentahoMetaStore( false ) ); assertFalse( ( new File( metaFolder ) ).exists() ); }