TextUtils { public static Set<String> readStopwordsFile(File file, boolean lowercase) throws IOException { return readStopwordsPath(file.toPath(), lowercase); }  static Set<String> readStopwordsFile(File file, boolean lowercase); static Set<String> readStopwordsFile(String location, boolean lowercase); static Set<String> readStopwordsInputStream(InputStream inputStream, boolean lowercase); static Set<String> readStopwordsPath(Path path, boolean lowercase); static Set<String> readStopwordsURL(URL url, boolean lowercase);  }
@Test public void testReadStopwordsFileString() throws Exception { String stopwordsFile = STOPWORDS_LOCATION; Set<String> stopwords = TextUtils.readStopwordsFile(stopwordsFile, false); assertEquals(EXPECTED_STOPWORDS, stopwords); }
@Test public void testReadStopwordsFile() throws Exception { File stopwordsFile = new File(STOPWORDS_LOCATION); Set<String> stopwords = TextUtils.readStopwordsFile(stopwordsFile, false); assertEquals(EXPECTED_STOPWORDS, stopwords); }