}
// basic auth handler should flow through when NOT challenged but no username is set
public void testNoUserNameBasicAuthAllowed() throws Exception {
server.getMockHttpServerResponses().get(0).setMockResponseCode(200);
ClientConfig config = new ClientConfig();
BasicAuthSecurityHandler basicAuthSecurityHandler = new BasicAuthSecurityHandler();
// oops, forgot to set 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());
}