MetricsVisitor extends SubscriptionVisitor { public Map<InputFile, Set<Integer>> executableLines() { return projectExecutableLines; } MetricsVisitor(SensorContext context, Boolean ignoreHeaderComments,
			FileLinesContextFactory fileLinesContextFactory); Map<InputFile, Set<Integer>> executableLines(); @Override Set<Kind> nodesToVisit(); @Override void leaveFile(Tree scriptTree); @Override void visitNode(Tree tree); @Override void visitFile(Tree scriptTree);  }
@Test public void test() { MetricsVisitor metricsVisitor = createMetricsVisitor(); metricsVisitor.scanTree(treeVisitorContext); assertThat(context.measure(COMPONENT_KEY, CoreMetrics.FUNCTIONS).value()).isEqualTo(0); assertThat(context.measure(COMPONENT_KEY, CoreMetrics.STATEMENTS).value()).isEqualTo(1); assertThat(context.measure(COMPONENT_KEY, EsqlMetrics.MODULES).value()).isEqualTo(1); assertThat(metricsVisitor.executableLines().get(INPUT_FILE)).containsOnly(5); }