### Question:
JKSKeyManager implements KeyManager { public PublicKey getPublicKey(String alias) { X509Certificate x509Certificate = getCertificate(alias); if (x509Certificate != null) { return x509Certificate.getPublicKey(); } else { return null; } } JKSKeyManager(KeyStore keyStore, Map<String, String> passwords, String defaultKey);  JKSKeyManager(Resource storeFile, String storePass, Map<String, String> passwords, String defaultKey); X509Certificate getCertificate(String alias); PublicKey getPublicKey(String alias); Iterable<Credential> resolve(CriteriaSet criteriaSet); Credential resolveSingle(CriteriaSet criteriaSet); Credential getCredential(String keyName); Credential getDefaultCredential(); String getDefaultCredentialName(); Set<String> getAvailableCredentials(); KeyStore getKeyStore();  }### Answer:
@Test public void testGetKey() { assertNotNull(keyManager.getPublicKey("apollo")); }
@Test public void testGetEmptyKey() { assertNull(keyManager.getPublicKey("")); assertNull(keyManager.getPublicKey(null)); }
@Test public void testGetKeyNonExistent() { assertNull(keyManager.getPublicKey("apollo111")); }