### Question:
QueryCompilerPass1 extends AqlBaseListener { public IdentifierMapper getIdentifierMapper() { return identifierMapper; } QueryCompilerPass1(); @Override void exitFromEHR(AqlParser.FromEHRContext context); @Override void exitFromForeignData(AqlParser.FromForeignDataContext context); @Override void exitContainExpressionBool(AqlParser.ContainExpressionBoolContext containExpressionBoolContext); @Override void exitContainsExpression(AqlParser.ContainsExpressionContext containsExpressionContext); @Override void exitSimpleClassExpr(AqlParser.SimpleClassExprContext simpleClassExprContext); IdentifierMapper getIdentifierMapper(); ContainPropositions containPropositions();  }### Answer:
@Test public void testGetIdentifierMapper() { ParseTreeWalker walker = new ParseTreeWalker(); { QueryCompilerPass1 cut = new QueryCompilerPass1(); String aql = "select e/ehr_id/value " + "from EHR e "; ParseTree tree = QueryHelper.setupParseTree(aql); walker.walk(cut, tree); IdentifierMapper identifierMapper = cut.getIdentifierMapper(); assertThat(identifierMapper.getClassName("e")).isEqualTo("EHR"); assertThat(identifierMapper.getEhrContainer()).isNull(); } { QueryCompilerPass1 cut = new QueryCompilerPass1(); String aql = "select e/ehr_id/value " + "from EHR e [ehr_id/value = '26332710-16f3-4b54-aae9-4d11c141388c']"; ParseTree tree = QueryHelper.setupParseTree(aql); walker.walk(cut, tree); IdentifierMapper identifierMapper = cut.getIdentifierMapper(); assertThat(identifierMapper.getClassName("e")).isEqualTo("EHR"); assertThat(identifierMapper.getEhrContainer().getField()).isEqualTo("ehr_id/value"); assertThat(identifierMapper.getEhrContainer().getIdentifier()).isEqualTo("e"); assertThat(identifierMapper.getEhrContainer().getOperator()).isEqualTo("="); assertThat(identifierMapper.getEhrContainer().getValue()).isEqualTo("'26332710-16f3-4b54-aae9-4d11c141388c'"); } { QueryCompilerPass1 cut = new QueryCompilerPass1(); String aql = "select e/ehr_id/value " + "from EHR e contains COMPOSITION a[openEHR-EHR-COMPOSITION.health_summary.v1]"; ParseTree tree = QueryHelper.setupParseTree(aql); walker.walk(cut, tree); IdentifierMapper identifierMapper = cut.getIdentifierMapper(); assertThat(identifierMapper.getClassName("e")).isEqualTo("EHR"); assertThat(identifierMapper.getClassName("a")).isEqualTo("COMPOSITION"); assertThat(identifierMapper.getArchetypeId("a")).isEqualTo("openEHR-EHR-COMPOSITION.health_summary.v1"); } { QueryCompilerPass1 cut = new QueryCompilerPass1(); String aql = "select a/uid/value " + "from EHR [ehr_id/value = '26332710-16f3-4b54-aae9-4d11c141388c'] contains COMPOSITION a[openEHR-EHR-COMPOSITION.health_summary.v1]"; ParseTree tree = QueryHelper.setupParseTree(aql); walker.walk(cut, tree); IdentifierMapper identifierMapper = cut.getIdentifierMapper(); assertThat(identifierMapper.getClassName("a")).isEqualTo("COMPOSITION"); assertThat(identifierMapper.getArchetypeId("a")).isEqualTo("openEHR-EHR-COMPOSITION.health_summary.v1"); } }