LimitedComparableProperty extends SimpleObjectProperty<T> implements LimitedProperty<T> { @Override public final void setMax(T max) { this.max.set(max); } LimitedComparableProperty();  LimitedComparableProperty(T initialValue);  LimitedComparableProperty(Object bean, String name);  LimitedComparableProperty(Object bean, String name, T initialValue);  LimitedComparableProperty(T min, T max);  LimitedComparableProperty(T initialValue, T min, T max);  LimitedComparableProperty(Object bean, String name, T min, T max);  LimitedComparableProperty(Object bean, String name, T initialValue, T min, T max); @Override ObjectProperty<T> minProperty(); @Override final T getMin(); @Override final void setMin(T min); @Override ObjectProperty<T> maxProperty(); @Override final T getMax(); @Override final void setMax(T max); @Override void set(T t);  }
@Test public void testSetMax() { test.set(5); assertEquals(5, test.get().intValue()); test.setMax(10); assertEquals(10, test.getMax().intValue()); assertEquals(5, test.get().intValue()); test.setMax(4); assertEquals(4, test.getMax().intValue()); assertEquals(4, test.get().intValue()); test.setMax(null); assertNull(test.getMax()); assertEquals(4, test.get().intValue()); }