@Test
public void testReadWhenSavedValueIsWrongType() {

  // given
  int initialValue = 10;
  IntegerProperty property = new SimpleIntegerProperty(null, "value", initialValue);
  preferences.putBoolean("value", false);
  // when
  PreferencesUtils.read(property, preferences);
  // then
  assertEquals(initialValue, property.getValue().intValue());
}