### Question:
QuickstartCqlVisitor extends cqlBaseVisitor { public Collection<String> getVariables() { return Collections.unmodifiableSet(variables); } QuickstartCqlVisitor(); String getLibrary(); String getVersion(); Collection<String> getVariables(); Map<String, ValueSet> getValuesets(); Collection<Retrieve> getRetrieves(); @Override Object visitLibraryDefinition(@NotNull cqlParser.LibraryDefinitionContext ctx); @Override Object visitLetStatement(@NotNull cqlParser.LetStatementContext ctx); @Override ValueSet visitValueset(@NotNull cqlParser.ValuesetContext ctx); @Override Object visitValuesetDefinition(@NotNull cqlParser.ValuesetDefinitionContext ctx); @Override Object visitMethodExpressionTerm(@NotNull cqlParser.MethodExpressionTermContext ctx); @Override Object visitRetrieve(@NotNull cqlParser.RetrieveContext ctx); @Override String visitStringLiteral(@NotNull cqlParser.StringLiteralContext ctx); static void main(String[] args);  }### Answer:
@Test public void testVariables() { QuickstartCqlVisitor v = visitLogic( "valueset \"Office Visit\" = ValueSet('2.16.840.1.113883.3.464.1003.101.12.1001')\n" + "valueset \"Acute Pharyngitis\" = ValueSet('2.16.840.1.113883.3.464.1003.102.12.1011')\n" + "let encounter = [NonOccurrence of Encounter, Performance: \"Office Visit\"]\n" + "let pharyngitis = [Condition: \"Acute Pharyngitis\"]"); Collection<String> varSet = v.getVariables(); assertEquals(varSet.size(), 2); assertTrue(varSet.contains("encounter")); assertTrue(varSet.contains("pharyngitis")); }