### Question:
SpiffeKeyManager extends X509ExtendedKeyManager { @Override public PrivateKey getPrivateKey(final String alias) { if (!Objects.equals(alias, DEFAULT_ALIAS)) { return null; } val x509Svid = x509SvidSource.getX509Svid(); return x509Svid.getPrivateKey(); } SpiffeKeyManager(@NonNull final X509SvidSource x509SvidSource); @Override X509Certificate[] getCertificateChain(final String alias); @Override PrivateKey getPrivateKey(final String alias); @Override String[] getClientAliases(final String keyType, final Principal[] issuers); @Override String chooseClientAlias(final String[] keyTypes, final Principal[] issuers, final Socket socket); @Override String chooseEngineClientAlias(final String[] keyTypes, final Principal[] issuers, final SSLEngine sslEngine); @Override String[] getServerAliases(final String keyType, final Principal[] issuers); @Override String chooseEngineServerAlias(final String keyType, final Principal[] issuers, final SSLEngine sslEngine); @Override String chooseServerAlias(final String keyType, final Principal[] issuers, final Socket socket);  }### Answer:
@Test void getPrivateKey_aliasIsSpiffe_returnAPrivateKey() { val privateKey = spiffeKeyManager.getPrivateKey(DEFAULT_ALIAS); assertNotNull(privateKey); }
@Test void getPrivateKey_aliasNotSupported() { PrivateKey privateKey = spiffeKeyManager.getPrivateKey("other_alias"); assertNull(privateKey); }