HostsFileReader { public void refresh() throws IOException { HostDetails hostDetails = current.get(); refresh(hostDetails.includesFile, hostDetails.excludesFile); } HostsFileReader(String inFile,
                         String exFile); @Private  HostsFileReader(String includesFile, InputStream inFileInputStream,
      String excludesFile, InputStream exFileInputStream); static void readFileToSet(String type,
      String filename, Set<String> set); @Private static void readFileToSetWithFileInputStream(String type,
      String filename, InputStream fileInputStream, Set<String> set); void refresh(); static void readFileToMap(String type,
      String filename, Map<String, Integer> map); static void readFileToMapWithFileInputStream(String type,
      String filename, InputStream inputStream, Map<String, Integer> map); static void readXmlFileToMapWithFileInputStream(String type,
      String filename, InputStream fileInputStream, Map<String, Integer> map); void refresh(String includesFile, String excludesFile); void lazyRefresh(String includesFile, String excludesFile); void finishRefresh(); @Private void refresh(InputStream inFileInputStream,
      InputStream exFileInputStream); Set<String> getHosts(); Set<String> getExcludedHosts(); @Deprecated void getHostDetails(Set<String> includes, Set<String> excludes); @Deprecated void getHostDetails(Set<String> includeHosts,
                             Map<String, Integer> excludeHosts); HostDetails getHostDetails(); HostDetails getLazyLoadedHostDetails(); void setIncludesFile(String includesFile); void setExcludesFile(String excludesFile); void updateFileNames(String includesFile, String excludesFile);  }
@Test public void testRefreshHostFileReaderWithNonexistentFile() throws Exception { FileWriter efw = new FileWriter(excludesFile); FileWriter ifw = new FileWriter(includesFile); efw.close(); ifw.close(); HostsFileReader hfp = new HostsFileReader(includesFile, excludesFile); assertTrue(INCLUDES_FILE.delete()); try { hfp.refresh(); Assert.fail("Should throw NoSuchFileException"); } catch (NoSuchFileException ex) { } }