### Question:
RestConfig { public ResteasyClient newRestEasyClient() { try { LOG.debug("Setting connect timeout to {} ms and read timeout to {} ms", connectTimeoutInMillis, readTimeoutInMillis); final RequestConfig requestConfig = RequestConfig.custom() .setConnectTimeout(connectTimeoutInMillis) .setConnectionRequestTimeout(connectTimeoutInMillis) .setSocketTimeout(readTimeoutInMillis) .build(); final HttpClient httpClient = HttpClientBuilder.create().useSystemProperties().setDefaultRequestConfig(requestConfig).build(); return new ResteasyClientBuilder() .httpEngine(new ApacheHttpClient4Engine(httpClient)) .build(); } catch (Exception e) { LOG.error(APIM_3003.pattern(), e); throw new RuntimeException("Error creating ResteasyClient.", e); } } RestConfig();  RestConfig(int connectTimeoutInMillis, int readTimeoutInMillis); ResteasyClient newRestEasyClient();  }### Answer:
@Test public void testNewRestEasyClient() { RestConfig restConfig = new RestConfig(); ResteasyClient resteasyClient = restConfig.newRestEasyClient(); assertNotNull(resteasyClient); }
@Test public void testCustomTrustStoreInvalidPassword() throws KeyStoreException { String truststore = RestConfigTest.class.getResource("/truststore.jks").getFile(); System.setProperty("javax.net.ssl.trustStore", truststore); System.setProperty("javax.net.ssl.trustStorePassword", "wrongPw"); RestConfig restConfig = new RestConfig(); ResteasyClient resteasyClient = restConfig.newRestEasyClient(); assertNotNull(resteasyClient); assertNull(resteasyClient.getSslContext()); }
@Test public void testCustomTrustStoreInvalidStore() throws KeyStoreException { System.setProperty("javax.net.ssl.trustStore", "noValidTrust"); System.setProperty("javax.net.ssl.trustStorePassword", "changeit"); RestConfig restConfig = new RestConfig(); ResteasyClient resteasyClient = restConfig.newRestEasyClient(); assertNotNull(resteasyClient); assertNull(resteasyClient.getSslContext()); }
@Test public void testNewRestEasyClientWithCustomProxy() { System.setProperty("https.proxyHost", "zscaler.sbb.ch"); System.setProperty("https.proxyPort", "9400"); RestConfig restConfig = new RestConfig(); ResteasyClient resteasyClient = restConfig.newRestEasyClient(); assertNotNull(resteasyClient); }