@Test
public void testSaveLong() {

  // given
  String name = "long";
  long value = Long.MAX_VALUE;
  LongProperty property = new SimpleLongProperty(null, name, value);
  // when
  PreferencesUtils.save(property, preferences);
  // then
  long saved = preferences.getLong(name, -1);
  assertEquals(value, saved);
}