### Question:
CertificateConfigurer { public void configure(ConfigurerParameters parameters) { CertificateConfiguration certConfig = getCertConfig(parameters); if (certConfig != null && certConfig.isUseCertificate()) { HttpClient client = parameters.getClient(); SslConfig sslConfig = client.getOptions().getSslConfig(); sslConfig.getCustomKeyManagers().addAll(certConfig.getKeyManagers()); sslConfig.getCustomTrustManagers().addAll(certConfig.getTrustManagers()); sslConfig.setHostNameVerifier(new LenientHostNameVerifier()); } }  void configure(ConfigurerParameters parameters);  }### Answer:
@Test public void testConfigure() throws GeneralSecurityException, IOException { EasyMockSupport support = new EasyMockSupport(); HttpClientOptions options = new HttpClientOptions(); HttpClient client = createClient(support, options); KeyManager keyManager = support.createMock(KeyManager.class); TrustManager trustManager = support.createMock(TrustManager.class); @SuppressWarnings("unchecked") Supplier<? extends Component> parentProvider = support.createMock(Supplier.class); PreferencesRegistry preferencesRegistry = support.createMock(PreferencesRegistry.class); SecurityManager securityManager = support.createMock(SecurityManager.class); SecurityComponentsProvider provider = createProvider(support, parentProvider, preferencesRegistry, securityManager, keyManager, trustManager); support.replayAll(); ConfigurerParameters parameters = new ConfigurerParameters(); parameters.setClient(client); parameters.setProvider(provider); parameters.setHost(ourHost); parameters.setServerKey(ourServerKey); parameters.setParentComponent(parentProvider); parameters.setPrefsRegistry(preferencesRegistry); parameters.setSecurityManager(securityManager); CertificateConfigurer configurer = new CertificateConfigurer(); configurer.configure(parameters); assertEquals(1, options.getSslConfig().getCustomKeyManagers().size()); assertEquals(keyManager, options.getSslConfig().getCustomKeyManagers().get(0)); assertEquals(1, options.getSslConfig().getCustomTrustManagers().size()); assertEquals(trustManager, options.getSslConfig().getCustomTrustManagers().get(0)); assertTrue(options.getSslConfig().getHostNameVerifier() instanceof LenientHostNameVerifier); support.verifyAll(); }