// that the connection is going through the proxy, because we
// specify a different port for the server in the resource URL
server.setMockResponseCode(200);
ClientConfig config = new ClientConfig();
config.proxyHost("localhost").proxyPort(serverPort);
RestClient client = new RestClient(config);
String resourceUrl = "http://googoo:" + (serverPort + 1) + "/some/service";
Resource resource = client.resource(resourceUrl);
resource.get(String.class);
assertEquals(resourceUrl, server.getRequestUrl());
}