TextUtils { public static Set<String> readStopwordsPath(Path path, boolean lowercase) throws IOException { return readStopwordsInputStream(Files.newInputStream(path), 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 testReadStopwordsFile3() throws Exception { Path stopwordsFile = new File(STOPWORDS_LOCATION).toPath(); Set<String> stopwords = TextUtils.readStopwordsPath(stopwordsFile, false); assertEquals(EXPECTED_STOPWORDS, stopwords); }