### Question:
HostsFileReader { public synchronized void refresh() throws IOException { LOG.info("Refreshing hosts (include/exclude) list"); Set<String> newIncludes = new HashSet<String>(); Set<String> newExcludes = new HashSet<String>(); boolean switchIncludes = false; boolean switchExcludes = false; if (!includesFile.isEmpty()) { readFileToSet("included", includesFile, newIncludes); switchIncludes = true; } if (!excludesFile.isEmpty()) { readFileToSet("excluded", excludesFile, newExcludes); switchExcludes = true; } if (switchIncludes) { includes = newIncludes; } if (switchExcludes) { excludes = newExcludes; } } 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); synchronized void refresh(); @Private synchronized void refresh(InputStream inFileInputStream,
      InputStream exFileInputStream); synchronized Set<String> getHosts(); synchronized Set<String> getExcludedHosts(); synchronized void setIncludesFile(String includesFile); synchronized void setExcludesFile(String excludesFile); synchronized void updateFileNames(String includesFile,
      String excludesFile);  }### Answer:
@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 FileNotFoundException"); } catch (FileNotFoundException ex) { } }