@Override
  public void execute(SensorContext context) {
    FileSystem fs = context.fileSystem();
    FilePredicates p = fs.predicates();
    for (InputFile file : fs.inputFiles(p.and(p.hasLanguages(Xoo.KEY), p.hasType(Type.MAIN)))) {
      createIssues(file, context);
    }
  }
@Test
  public void execute_dataAndExecutionFlowsAreDetectedAndMessageIsFormatted() throws IOException {
    DefaultInputFile inputFile = newTestFile(IOUtils.toString(getClass().getResource("dataflow.xoo"), StandardCharsets.UTF_8));

    DefaultFileSystem fs = new DefaultFileSystem(temp.newFolder());
    fs.add(inputFile);

    SensorContextTester sensorContextTester = SensorContextTester.create(fs.baseDir());
    sensorContextTester.setFileSystem(fs);
    sensor.execute(sensorContextTester);

    assertThat(sensorContextTester.allIssues()).hasSize(1);

    Issue issue = sensorContextTester.allIssues().iterator().next();
    assertThat(issue.primaryLocation().messageFormattings()).isNotEmpty();

    List<Issue.Flow> flows = issue.flows();
    assertThat(flows).hasSize(2);

    List<DefaultIssueFlow> defaultIssueFlows = flows.stream().map(DefaultIssueFlow.class::cast).toList();
    assertThat(defaultIssueFlows).extracting(DefaultIssueFlow::type).containsExactlyInAnyOrder(FlowType.DATA, FlowType.EXECUTION);

    assertThat(flows.get(0).locations()).extracting(IssueLocation::messageFormattings).isNotEmpty();
    assertThat(flows.get(1).locations()).extracting(IssueLocation::messageFormattings).isNotEmpty();
  }