### Question:
FileConfiguration extends MemoryConfiguration { public void load(File file) throws FileNotFoundException, IOException, InvalidConfigurationException { Validate.notNull(file, "File cannot be null"); final FileInputStream stream = new FileInputStream(file); load(new InputStreamReader(stream, UTF8_OVERRIDE && !UTF_BIG ? Charsets.UTF_8 : Charset.defaultCharset())); } FileConfiguration();  FileConfiguration(Configuration defaults); void save(File file); void save(String file); abstract String saveToString(); void load(File file); @Deprecated void load(InputStream stream); void load(Reader reader); void load(String file); abstract void loadFromString(String contents); @Override FileConfigurationOptions options(); @Deprecated
    static final boolean UTF8_OVERRIDE; @Deprecated
    static final boolean UTF_BIG; @Deprecated
    static final boolean SYSTEM_UTF; }### Answer:
@Test public void testLoad_File() throws Exception { FileConfiguration config = getConfig(); File file = testFolder.newFile("test.config"); BufferedWriter writer = new BufferedWriter(new FileWriter(file)); String saved = getTestValuesString(); Map<String, Object> values = getTestValues(); try { writer.write(saved); } finally { writer.close(); } config.load(file); for (Map.Entry<String, Object> entry : values.entrySet()) { assertEquals(entry.getValue(), config.get(entry.getKey())); } assertEquals(values.keySet(), config.getKeys(true)); }
@Test public void testLoad_String() throws Exception { FileConfiguration config = getConfig(); File file = testFolder.newFile("test.config"); BufferedWriter writer = new BufferedWriter(new FileWriter(file)); String saved = getTestValuesString(); Map<String, Object> values = getTestValues(); try { writer.write(saved); } finally { writer.close(); } config.load(file.getAbsolutePath()); for (Map.Entry<String, Object> entry : values.entrySet()) { assertEquals(entry.getValue(), config.get(entry.getKey())); } assertEquals(values.keySet(), config.getKeys(true)); }