### Question:
ConfigFactory { public static Config fromFile(String file) throws BadConfigException, FileNotFoundException { return fromFile(new File(file)); } private  ConfigFactory(); static Config fromFile(String file); static Config fromFile(File file);  }### Answer:
@Test public void testFromFile() throws Exception { Config conf = ConfigFactory.fromFile(getFileString("/xml-config-test.xml")); assertNotNull(conf); }
@Test public void testFromFile1() throws Exception { Config conf = ConfigFactory.fromFile(getFile("/xml-config-test.xml")); assertNotNull(conf); }
@Test(expected = FileNotFoundException.class) public void testInvalidFileString() throws Exception { Config conf = ConfigFactory.fromFile("does-not-exist"); }
@Test(expected = FileNotFoundException.class) public void testInvalidFile() throws Exception { Config conf = ConfigFactory.fromFile(new File("does-not-exist")); }