when(mockEntity.getContent()).thenReturn(IOUtils.toInputStream("This is not really json, is it?", "utf-8"));
HttpResponse mockResponse = createMockResponse(mockEntity);
Response response = new DefaultResponse(mockResponse, 12345);
try {
response.asJson();
Assert.fail();
} catch (RuntimeMappingException rme) {
assertThat(rme.getMessage(), is("Can't parse JSON. Bad content >> This is not real..."));