@Test
public void testSaveString() {

  // given
  String name = "string";
  String value = "foobar";
  StringProperty property = new SimpleStringProperty(null, name, value);
  // when
  PreferencesUtils.save(property, preferences);
  // then
  String saved = preferences.get(name, null);
  assertEquals(value, saved);
}