public static void createKeyStore(String filename, String password, String alias, Key privateKey,
    Certificate cert) throws GeneralSecurityException, IOException {
    createKeyStore(filename, password, password, alias, privateKey, cert);
  }
Creates a keystore with a single key and saves it to a file. This method will use the same
password for the keystore and for the key. This method will always generate a keystore file in
JKS format.
@param filename   String file to save
@param password   String store password to set on keystore
@param alias      String alias to use for the key
@param privateKey Key to save in keystore
@param cert       Certificate to use as certificate chain associated to key
@throws GeneralSecurityException for any error with the security APIs
@throws IOException              if there is an I/O error saving the file
hbase-http/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java