@Test
public void testSaveDouble() {

  // given
  String name = "double";
  double value = Double.MAX_VALUE;
  DoubleProperty property = new SimpleDoubleProperty(null, name, value);
  // when
  PreferencesUtils.save(property, preferences);
  // then
  double saved = preferences.getDouble(name, -1);
  assertEquals(value, saved);
}