### Question:
AqlExpression { public String dump() { if (parseTree != null && aqlParser != null) return parseTree.toStringTree(aqlParser); else return "**not initialized**"; }  AqlExpression parse(String query); String dump(); ParseTree getParseTree();  }### Answer:
@Test public void testDump() { String query = "SELECT o/data[at0002]/events[at0003] AS systolic\n" + "FROM EHR [ehr_id/value='1234'] \n" + "CONTAINS COMPOSITION c [openEHR-EHR-COMPOSITION.encounter.v1] \n" + "CONTAINS OBSERVATION o [openEHR-EHR-OBSERVATION.blood_pressure.v1]\n" + "WHERE o/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/value > 140"; assertThat(new AqlExpression().parse(query).dump()).isEqualTo("(query (queryExpr (select SELECT (selectExpr (identifiedPath o / (objectPath (pathPart data (predicate [ (nodePredicateOr (nodePredicateAnd (nodePredicateComparable at0002))) ])) / (pathPart events (predicate [ (nodePredicateOr (nodePredicateAnd (nodePredicateComparable at0003))) ])))) AS systolic)) (from FROM (fromEHR EHR (standardPredicate [ (predicateExpr (predicateAnd (predicateEquality (predicateOperand (objectPath (pathPart ehr_id) / (pathPart value))) = (predicateOperand (operand '1234'))))) ])) CONTAINS (containsExpression (containExpressionBool (contains (simpleClassExpr (archetypedClassExpr COMPOSITION c [ openEHR-EHR-COMPOSITION.encounter.v1 ])) CONTAINS (containsExpression (containExpressionBool (contains (simpleClassExpr (archetypedClassExpr OBSERVATION o [ openEHR-EHR-OBSERVATION.blood_pressure.v1 ]))))))))) (where WHERE (identifiedExpr (identifiedEquality (identifiedOperand (identifiedPath o / (objectPath (pathPart data (predicate [ (nodePredicateOr (nodePredicateAnd (nodePredicateComparable at0001))) ])) / (pathPart events (predicate [ (nodePredicateOr (nodePredicateAnd (nodePredicateComparable at0006))) ])) / (pathPart data (predicate [ (nodePredicateOr (nodePredicateAnd (nodePredicateComparable at0003))) ])) / (pathPart items (predicate [ (nodePredicateOr (nodePredicateAnd (nodePredicateComparable at0004))) ])) / (pathPart value) / (pathPart value)))) > (identifiedOperand (operand 140))))) <EOF>))"); }