@Override
  public File getScannerEngine() {
    File scannerDir = new File(fs.getHomeDir(), "lib/scanner");
    if (!scannerDir.exists()) {
      throw new NotFoundException(format("Scanner directory not found: %s", scannerDir.getAbsolutePath()));
    }
    return listFiles(scannerDir, VISIBLE, directoryFileFilter())
      .stream()
      .filter(file -> file.getName().endsWith(".jar"))
      .findFirst()
      .orElseThrow(() -> new NotFoundException(format("Scanner JAR not found in directory: %s", scannerDir.getAbsolutePath())));
  }
@Test
  void getScannerEngine_shouldFail_whenScannerNotFound() throws IOException {
    Path tempDirectory = createDirectories(scannerDir);

    assertThatThrownBy(() -> scannerEngineHandler.getScannerEngine())
      .isInstanceOf(NotFoundException.class)
      .hasMessage(format("Scanner JAR not found in directory: %s", tempDirectory.toAbsolutePath()));
  }