@Test
public void saveSettingsShouldConvertAllValuesToStringsToAvoidClassCastException() throws IOException {

    settings.getMe().setNick("Linda");
    settings.setOwnColor(100);
    settings.setSysColor(-200);
    settings.setSound(false);
    settings.setLogging(true);
    settings.setSmileys(false);
    settings.setBalloons(true);
    settings.setSystemTray(false);
    settings.setBrowser("firefox");
    settings.setLookAndFeel("starwars");
    settings.setNetworkInterface("wlan2");
    settingsSaver.saveSettings();
    final ArgumentCaptor<Properties> propertiesCaptor = ArgumentCaptor.forClass(Properties.class);
    verify(propertyTools).saveProperties(anyString(), propertiesCaptor.capture(), anyString());
    final Properties properties = propertiesCaptor.getValue();
    assertEquals(11, properties.size());
    assertEquals("Linda", properties.get(NICK_NAME.getKey()));
    assertEquals("100", properties.get(OWN_COLOR.getKey()));
    assertEquals("-200", properties.get(SYS_COLOR.getKey()));
    assertEquals("false", properties.get(SOUND.getKey()));
    assertEquals("true", properties.get(LOGGING.getKey()));
    assertEquals("false", properties.get(SMILEYS.getKey()));
    assertEquals("true", properties.get(BALLOONS.getKey()));
    assertEquals("false", properties.get(SYSTEM_TRAY.getKey()));
    assertEquals("firefox", properties.get(BROWSER.getKey()));
    assertEquals("starwars", properties.get(LOOK_AND_FEEL.getKey()));
    assertEquals("wlan2", properties.get(NETWORK_INTERFACE.getKey()));
}