Neo4jResponse { public boolean hasErrors() { Boolean hasErrors = Boolean.FALSE; if (this.errors != null && !this.errors.isEmpty()) { hasErrors = Boolean.TRUE; } return hasErrors; } Neo4jResponse(HttpResponse response, ObjectMapper mapper); Integer getCode(); String getLocation(); List<Neo4jResult> getResults(); Neo4jResult getFirstResult(); List<SQLException> getErrors(); boolean hasErrors(); boolean hasResultSets(); String displayErrors();  }
@Test public void hasErrorShoudlReturnFalse() throws SQLException { Neo4jResponse response = generateNeo4jResponse(Boolean.FALSE); Assert.assertFalse(response.hasErrors()); }
@Test public void hasErrorShoudlReturnTrue() throws SQLException { Neo4jResponse response = generateNeo4jResponse(Boolean.TRUE); Assert.assertTrue(response.hasErrors()); }