public void markAsUnchanged(DefaultInputFile file) {
    if (isFeatureActive()) {
      if (file.status() != InputFile.Status.SAME) {
        LOG.error("File '{}' was marked as unchanged but its status is {}", file.getProjectRelativePath(), file.status());
      } else {
        LOG.debug("File '{}' marked as unchanged", file.getProjectRelativePath());
        file.setMarkedAsUnchanged(true);
      }
    }
  }
@Test
  public void not_active_if_using_different_reference() {
    logTester.setLevel(Level.DEBUG);
    BranchConfiguration differentRefConfig = branchConfiguration("a", "b", false);
    UnchangedFilesHandler handler = new UnchangedFilesHandler(enabledConfig, differentRefConfig, executingSensorContext);
    assertThat(logTester.logs()).contains("Optimization for unchanged files not enabled because it's not an analysis of a branch with a previous analysis");

    handler.markAsUnchanged(file);
    verifyNoInteractions(file);
  }