### Question:
FileConfiguration extends MemoryConfiguration { public void save(File file) throws IOException { Validate.notNull(file, "File cannot be null"); Files.createParentDirs(file); String data = saveToString(); Writer writer = new OutputStreamWriter(new FileOutputStream(file), UTF8_OVERRIDE && !UTF_BIG ? Charsets.UTF_8 : Charset.defaultCharset()); try { writer.write(data); } finally { writer.close(); } } 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 testSave_File() throws Exception { FileConfiguration config = getConfig(); File file = testFolder.newFile("test.config"); for (Map.Entry<String, Object> entry : getTestValues().entrySet()) { config.set(entry.getKey(), entry.getValue()); } config.save(file); assertTrue(file.isFile()); }
@Test public void testSave_String() throws Exception { FileConfiguration config = getConfig(); File file = testFolder.newFile("test.config"); for (Map.Entry<String, Object> entry : getTestValues().entrySet()) { config.set(entry.getKey(), entry.getValue()); } config.save(file.getAbsolutePath()); assertTrue(file.isFile()); }