basicAuthSecurityHandler.setUserName("basicuser");
basicAuthSecurityHandler.setPassword("basicpassword");
ProxyAuthSecurityHandler proxyAuthSecurityHandler = new ProxyAuthSecurityHandler();
proxyAuthSecurityHandler.setUserName("username");
proxyAuthSecurityHandler.setPassword("password");
config.handlers(proxyAuthSecurityHandler, basicAuthSecurityHandler); // proxy first, then basic, of course
RestClient client = new RestClient(config);
Resource resource = client.resource(serviceURL);
ClientResponse response = resource.get();
assertEquals(200, response.getStatusCode());
}