when(mockEntity.getContent()).thenReturn(new ByteArrayInputStream(bytes));
HttpResponse mockResponse = createMockResponse(mockEntity);
Response response = new DefaultResponse(mockResponse, 12345);
assertThat(response.asBytes(), is(bytes));
assertThat(response.asText(), is("Jeff"));
}
@Test
public void asJsonErrorGivesClearMessage() throws IOException {