@Test
public void testSliderValueProperty() throws Exception {

  JSlider slider = new JSlider(0, 100, 50);
  SliderValueProperty sliderValue = new SliderValueProperty(slider);
  CountListener listener = new CountListener();
  sliderValue.addListener(listener);
  assertThat(sliderValue.get()).isEqualTo(50);
  assertThat(listener.getCount()).isEqualTo(0);
  slider.setValue(90);
  assertThat(sliderValue.get()).isEqualTo(90);
  assertThat(listener.getCount()).isEqualTo(1);
  sliderValue.set(10);
  assertThat(slider.getValue()).isEqualTo(10);
  assertThat(listener.getCount()).isEqualTo(2);
}