public File getKeyStoreFile(KeyStoreFileType storeFileType) throws IOException {
    switch (storeFileType) {
      case JKS:
        return getKeyStoreJksFile();
      case PEM:
        return getKeyStorePemFile();
      case PKCS12:
        return getKeyStorePkcs12File();
      case BCFKS:
        return getKeyStoreBcfksFile();
      default:
        throw new IllegalArgumentException("Invalid key store type: " + storeFileType
          + ", must be one of: " + Arrays.toString(KeyStoreFileType.values()));
    }
  }
Returns the path to the key store file in the given format (JKS, PEM, ...). Note that the file
is created lazily, the first time this method is called. The key store file is temporary and
will be deleted on exit.
@param storeFileType the store file type (JKS, PEM, ...).
@return the path to the key store file.
@throws IOException if there is an error creating the key store file.
hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/tls/X509TestContext.java