public X509TestContext cloneWithNewKeystoreCert(X509Certificate cert) {
    return new X509TestContext(tempDir, conf, trustStoreCertificate, trustStorePassword,
      trustStoreKeyPair, trustStoreJksFile, trustStorePemFile, trustStorePkcs12File,
      keyStoreKeyPair, keyStorePassword, cert);
  }
Creates a clone of the current context, but injecting the passed certificate as the KeyStore
cert. The new context's keystore path fields are nulled, so the next call to
{@link #setConfigurations(KeyStoreFileType, KeyStoreFileType)},
{@link #setKeystoreConfigurations(KeyStoreFileType, Configuration)} , or
{@link #getKeyStoreFile(KeyStoreFileType)} will create a new keystore with this certificate in
place.
@param cert the cert to replace
hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/tls/X509TestContext.java