### Question:
Analyzer { public AnalyzerResult analyze(List<String> filePaths) throws FileNotFoundException { if (filePaths == null || filePaths.isEmpty()) { return null; } List<File> files = new LinkedList<>(); for (String filePath : filePaths) { File file = new File(filePath); if (file.exists()) { files.add(file); } else { throw new FileNotFoundException("File not found: " + filePath); } } Map<String, List<MarkerPair>> result = analyzeFiles(files); AnalyzerResult analyzerResult = new AnalyzerResult(result); return analyzerResult; }  AnalyzerResult analyze(List<String> filePaths);  }### Answer:
@Test public void test_processFiles__notFound() { String rootPath = path + "notFound/"; List<String> rootPaths = new LinkedList<>(); rootPaths.add(rootPath); try { processor.analyze(rootPaths); fail("Should throw an exception!"); } catch (FileNotFoundException e) { assertThat("File not found: " + rootPath, is(e.getMessage())); } }
@Test public void test_processFiles__single_file() throws FileNotFoundException { String filePath = path + "test_pair.txt"; List<String> roots = new LinkedList<>(); roots.add(filePath); List<MarkerPair> pairs = getMarkers(); Map<String, List<MarkerPair>> result = new HashMap<>(); result.put(filePath, pairs); AnalyzerResult expectedAnalyzerResult = new AnalyzerResult(result); AnalyzerResult actualAnalyzerResult = processor.analyze(roots); assertThat(actualAnalyzerResult, is(expectedAnalyzerResult)); assertThat(actualAnalyzerResult.hasResults(), is(true)); }