SSLManager { public TrustManager[] getClientTrustManagers() { TrustManager[] trustManagers = null; TrustManagerFactory trustManagerFactory; try { trustManagerFactory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm() ); trustManagerFactory.init( trustStore ); trustManagers = trustManagerFactory.getTrustManagers(); trustStoreData.getPassword(); } catch ( Exception e ) { LOGGER.error( "Error getting array of trust managers: {}", e.getMessage() ); } return trustManagers; } SSLManager( KeyStore keyStore, KeyStoreData keyStoreData, KeyStore trustStore, KeyStoreData trustStoreData ); KeyManager[] getClientKeyManagers(); TrustManager[] getClientTrustManagers(); TrustManager[] getClientFullTrustManagers();  }
@Test public void testGetClientTrustManagers() throws Exception { sslManager.getClientTrustManagers(); }
@Test public void testGetClientTrustManagersException() throws Exception { when( keyStoreData.getPassword() ).thenThrow( Exception.class ); sslManager.getClientTrustManagers(); }