@After
  public synchronized void tearDown() throws Exception {
    try {
      if (port >= 0) {
        stopServer(port);
        port = -1;
      }
      // Clear the SSL system properties before each test.
      System.clearProperty(ObjectStore.TRUSTSTORE_PATH_KEY);
      System.clearProperty(ObjectStore.TRUSTSTORE_PASSWORD_KEY);
      System.clearProperty(ObjectStore.TRUSTSTORE_TYPE_KEY);
      //
    } finally {
      client = null;
      conf = null;
    }
  }
Abstract the property client access on a given namespace.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/properties/HMSTestBase.java