### Question:
HostsFileReader { public synchronized void refresh() throws IOException { LOG.info("Refreshing hosts (include/exclude) list"); if (!includesFile.equals("")) { Set<String> newIncludes = new HashSet<String>(); readFileToSet(includesFile, newIncludes); includes = newIncludes; } if (!excludesFile.equals("")) { Set<String> newExcludes = new HashSet<String>(); readFileToSet(excludesFile, newExcludes); excludes = newExcludes; } } HostsFileReader(String inFile, 
                         String exFile); synchronized void refresh(); 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) { } }