public void testHttpErrorWithResponse() throws IOException {
server.setMockResponseCode(400);
RestClient client = getRestClient();
Resource resource = client.resource(serviceURL);
try {
ClientResponse res = resource.accept("text/plain").get();
assertTrue(res.getStatusCode() == 400);
assertEquals(400, res.getStatusType().getStatusCode());
assertEquals(Family.CLIENT_ERROR, res.getStatusType().getFamily());
assertEquals("Bad Request", res.getStatusType().getReasonPhrase());