@Test
public void testSaveBoolean() {

  // given
  String name = "boolean";
  boolean value = true;
  BooleanProperty property = new SimpleBooleanProperty(null, name, value);
  // when
  PreferencesUtils.save(property, preferences);
  // then
  boolean saved = preferences.getBoolean(name, !value);
  assertEquals(value, saved);
}