### Question:
QueryResultParser { public void parseResult(InputStream json) throws IOException { JsonParser jp = mapper.getFactory().createParser(json); try { parseResult(jp); } finally { jp.close(); } } QueryResultParser(Class<T> type, ObjectMapper mapper); void parseResult(InputStream json); int getTotalRows(); long getOffset(); List<T> getRows(); String getLastId(); JsonNode getLastKey(); String getFirstId(); JsonNode getFirstKey(); void setIgnoreNotFound(boolean ignoreNotFound); Long getUpdateSequence();  }### Answer:
@Test( expected = ViewResultException.class ) public void given_view_result_contains_error_then_exception_should_be_thrown() throws Exception { parser.parseResult(loadData("view_result_with_error.json")); }
@Test( expected = DbAccessException.class ) public void given_view_result_contains_error_then_exception_should_be_thrown2() throws Exception { parser.parseResult(loadData("erroneous_cloudant_view_result.json")); }