@Test
public void saveSettingsShouldHandleNullStringsToAvoidNullPointerException() throws IOException {

    settings.getMe().setNick(null);
    settings.setBrowser(null);
    settings.setLookAndFeel(null);
    settings.setNetworkInterface(null);
    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("", properties.get(NICK_NAME.getKey()));
    assertEquals("", properties.get(BROWSER.getKey()));
    assertEquals("", properties.get(LOOK_AND_FEEL.getKey()));
    assertEquals("", properties.get(NETWORK_INTERFACE.getKey()));
}