@Test
public void testSaveInt() {

  // given
  String name = "int";
  int value = Integer.MAX_VALUE;
  IntegerProperty property = new SimpleIntegerProperty(null, name, value);
  // when
  PreferencesUtils.save(property, preferences);
  // then
  int saved = preferences.getInt(name, -1);
  assertEquals(value, saved);
}