server.setMockHttpServerResponses(response1, response2);
ClientConfig config = new ClientConfig();
BasicAuthSecurityHandler basicAuthSecurityHandler = new BasicAuthSecurityHandler();
basicAuthSecurityHandler.setUserName("username");
basicAuthSecurityHandler.setPassword("password");
config.handlers(basicAuthSecurityHandler);
RestClient client = new RestClient(config);
Resource resource = client.resource(serviceURL);
ClientResponse response = resource.get();
assertEquals(200, response.getStatusCode());
}