@Test public void testClientWithProxy() throws Exception { connector = ImmutableConnector.builder().from(connector) .proxyHost("127.0.0.1") .proxyPort(8901) .build(); client = new AbstractRemoteClientImpl(connector, AbstractRemoteClientImpl.RetroService.class); Call<String> remoteCall = client.svc().get(); try { remoteCall.execute(); fail("This should not succeed! If it does, check any running processes that bind the specified port!"); } catch (ConnectException e) { assertThat("Service was correctly initialized", client.svc(), notNullValue()); assertThat("Attempting to execute the call, should result in a proxy connect failure", e.getMessage(), containsString("127.0.0.1:8901")); } }
public S svc() { return svc; }
AbstractRemoteClient implements RemoteClient { public S svc() { return svc; } }
AbstractRemoteClient implements RemoteClient { public S svc() { return svc; } protected  AbstractRemoteClient(EndpointConnector connector, Class<S> cls); }
AbstractRemoteClient implements RemoteClient { public S svc() { return svc; } protected  AbstractRemoteClient(EndpointConnector connector, Class<S> cls); boolean authenticate(); static String prefixTokenHeader(byte[] token, @Nonnull String prefix); S svc(); static char[] byteToCharArray(byte[] bytes); final EndpointConnector connector(); @Override String endpoint(); }
AbstractRemoteClient implements RemoteClient { public S svc() { return svc; } protected  AbstractRemoteClient(EndpointConnector connector, Class<S> cls); boolean authenticate(); static String prefixTokenHeader(byte[] token, @Nonnull String prefix); S svc(); static char[] byteToCharArray(byte[] bytes); final EndpointConnector connector(); @Override String endpoint();  }