JavadocSupport { public static List<SearchIndexValue> findSearchIndexValues(List<File> filesToIndex) throws BuilderException { final List<SearchIndexValue> values = new ArrayList<>(); for (final File f : filesToIndex) { final List<SearchIndexValue> indexValues = indexFile(f); values.addAll(indexValues); } return values; } private  JavadocSupport(); static IndexData findIndexFile(File javadocDir); static List<SearchIndexValue> findSearchIndexValues(List<File> filesToIndex);  }
@Test public void testWarnsOfStrayTags() throws Exception { final URI uri = this.getClass().getResource(INDEX_ALL_BAD_TAG_HTML).toURI(); final List<File> filesToIndex = Collections.singletonList(new File(uri)); final ByteArrayOutputStream errStream = new ByteArrayOutputStream(); System.setErr(new PrintStream(errStream)); try { JavadocSupport.findSearchIndexValues(filesToIndex); } finally { System.setErr(null); } final String err = errStream.toString(); assertThat(err, containsString("Something went wrong with parsing a link, possibly unescaped tags" + " in Javadoc. (Name: , Type: CONSTRUCTOR, Link: )")); assertThat(err, containsString("Most recently parsed value was: (Name: SampleClass, Type: CLASS," + " Path: ./com/megatome/j2d/sample/clazz/SampleClass.html)")); }