### Question:
AMKeyProvider implements KeyProvider { public java.security.PublicKey getPublicKey(String keyAlias) { if (keyAlias == null || keyAlias.length() == 0) { return null; } java.security.PublicKey pkey = null; try { X509Certificate cert = (X509Certificate) ks.getCertificate(keyAlias); if (cert == null) { logger.error("Unable to retrieve certificate with alias '" + keyAlias + "' from keystore " + "'" + this.keystoreFile + "'"); return null; } pkey = cert.getPublicKey(); } catch (KeyStoreException e) { logger.error("Unable to get public key:" + keyAlias, e); } return pkey; } AMKeyProvider();  AMKeyProvider(
            String keyStoreFilePropName, String keyStorePassFilePropName,
            String keyStoreTypePropName, String privateKeyPassFilePropName);  AMKeyProvider(boolean alreadyResolved,
            String keyStoreFile, String keyStorePass,
            String keyStoreType, String privateKeyPass); static String decodePassword(String password); void setLogger(Debug logger); void setKey(String storepass, String keypass); java.security.cert.X509Certificate getX509Certificate(
            String certAlias); java.security.PublicKey getPublicKey(String keyAlias); java.security.PrivateKey getPrivateKey(String certAlias); @Override SecretKey getSecretKey(String certAlias); PrivateKey getPrivateKey(String certAlias, String encryptedKeyPass); KeyPair getKeyPair(String certAlias); String getCertificateAlias(Certificate cert); char[] getKeystorePass(); String getPrivateKeyPass(); String getKeystoreType(); String getKeystoreFilePath(); KeyStore getKeyStore(); void setCertificateEntry(String certAlias, Certificate cert); Certificate getCertificate(String certAlias); void store(); Certificate getCertificate(
            java.security.PublicKey publicKey); @Override boolean containsKey(String alias);  }### Answer:
@Test public void getDefaultPublicKey() { PublicKey key = amKeyProvider.getPublicKey(DEFAULT_PRIVATE_KEY_ALIAS); Assert.assertNotNull(key); }
@Test public void getPublicKey() { PublicKey key = amKeyProvider.getPublicKey(PRIVATE_KEY_ALIAS); Assert.assertNotNull(key); }