### Question:
CxfTypeSafeClientBuilder implements RestClientBuilder, Configurable<RestClientBuilder> { @Override public RestClientBuilder proxyAddress(String proxyHost, int proxyPort) { if (proxyHost == null) { throw new IllegalArgumentException("proxyHost must not be null"); } if (proxyPort < 1 || proxyPort > 65535) { throw new IllegalArgumentException("proxyPort must be between 1 and 65535"); } configImpl.property(ClientProperties.HTTP_PROXY_SERVER_PROP, proxyHost); configImpl.property(ClientProperties.HTTP_PROXY_SERVER_PORT_PROP, proxyPort); return this; }  @Override RestClientBuilder baseUrl(URL url); @Override RestClientBuilder baseUri(URI uri); @Override RestClientBuilder executorService(ExecutorService executor); @Override RestClientBuilder connectTimeout(long timeout, TimeUnit unit); @Override RestClientBuilder readTimeout(long timeout, TimeUnit unit); @Override T build(Class<T> aClass); @Override Configuration getConfiguration(); @Override RestClientBuilder property(String key, Object value); @Override RestClientBuilder register(Class<?> componentClass); @Override RestClientBuilder register(Object component); @Override RestClientBuilder register(Class<?> componentClass, int priority); @Override RestClientBuilder register(Class<?> componentClass, Class<?>... contracts); @Override RestClientBuilder register(Class<?> componentClass, Map<Class<?>, Integer> contracts); @Override RestClientBuilder register(Object component, int priority); @Override RestClientBuilder register(Object component, Class<?>... contracts); @Override RestClientBuilder register(Object component, Map<Class<?>, Integer> contracts); @Override RestClientBuilder sslContext(SSLContext sslContext); @Override RestClientBuilder keyStore(KeyStore store, String password); @Override RestClientBuilder trustStore(KeyStore store); @Override RestClientBuilder hostnameVerifier(HostnameVerifier verifier); @Override RestClientBuilder followRedirects(boolean follows); @Override RestClientBuilder proxyAddress(String proxyHost, int proxyPort); @Override RestClientBuilder queryParamStyle(QueryParamStyle style); void close();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testProxyAddressInvalidPort1() { RestClientBuilder.newBuilder().proxyAddress("cxf.apache.org", -1); }
@Test(expected = IllegalArgumentException.class) public void testProxyAddressInvalidPort2() { RestClientBuilder.newBuilder().proxyAddress("a.com", Integer.MAX_VALUE); }
@Test(expected = IllegalArgumentException.class) public void testProxyAddressNullHost() { RestClientBuilder.newBuilder().proxyAddress(null, 8080); }