@Override
  public void execute(SensorContext context) {
    for (InputFile file : context.fileSystem().inputFiles(context.fileSystem().predicates().hasLanguages(Xoo.KEY))) {
      processFileError(file, context);
    }
  }
@Test
  public void test() throws IOException {
    Path baseDir = temp.newFolder().toPath().toAbsolutePath();
    createErrorFile(baseDir);

    int[] startOffsets = {10, 20, 30, 40};
    int[] endOffsets = {19, 29, 39, 49};
    DefaultInputFile inputFile = new TestInputFileBuilder("foo", "src/foo.xoo")
      .setLanguage("xoo")
      .setOriginalLineStartOffsets(startOffsets)
      .setOriginalLineEndOffsets(endOffsets)
      .setModuleBaseDir(baseDir)
      .setLines(4)
      .build();
    SensorContextTester context = SensorContextTester.create(baseDir);
    context.fileSystem().add(inputFile);

    sensor.execute(context);
    assertThat(context.allAnalysisErrors()).hasSize(1);
    AnalysisError error = context.allAnalysisErrors().iterator().next();

    assertThat(error.inputFile()).isEqualTo(inputFile);
    assertThat(error.location()).isEqualTo(new DefaultTextPointer(1, 4));
    assertThat(error.message()).isEqualTo("my error");
  }