@Test
public void savePropertiesShouldFlushAndCloseFileWriterWhenDone() throws IOException {

    final File filePath = getTempPathTo("temp4.properties");
    assertFalse(filePath.exists());
    final Properties properties = new Properties();
    properties.put("key", "value");
    propertyTools.saveProperties(filePath.getAbsolutePath(), properties, null);
    assertTrue(filePath.exists());
    verify(ioTools).flush(any(FileWriter.class));
    verify(ioTools).close(any(FileWriter.class));
}