SSLManager { public KeyManager[] getClientKeyManagers() { KeyManager[] keyManagers = null; KeyManagerFactory keyManagerFactory; try { keyManagerFactory = KeyManagerFactory.getInstance( KeyManagerFactory.getDefaultAlgorithm() ); keyManagerFactory.init( keyStore, keyStoreData.getPassword().toCharArray() ); keyManagers = keyManagerFactory.getKeyManagers(); } catch ( Exception e ) { LOGGER.error( "Error getting array of client key managers: {}", e.getMessage() ); } return keyManagers; } SSLManager( KeyStore keyStore, KeyStoreData keyStoreData, KeyStore trustStore, KeyStoreData trustStoreData ); KeyManager[] getClientKeyManagers(); TrustManager[] getClientTrustManagers(); TrustManager[] getClientFullTrustManagers();  }
@Test public void testGetClientKeyManagers() throws Exception { when( keyStoreData.getPassword() ).thenReturn( "password" ); sslManager.getClientKeyManagers(); }