@Test
public void testModelChanged() {

  // Note: model units are kept in 1000th of a range unit
  assertEquals(0, myScrollbar.getModel().getMinimum());
  assertEquals(10, myScrollbar.getModel().getMaximum());
  assertEquals(0, myScrollbar.getModel().getValue());
  assertEquals(5, myScrollbar.getModel().getExtent());
  // Update view range.
  myTimeline.getViewRange().set(1000, 4000);
  assertEquals(0, myScrollbar.getModel().getMinimum());
  assertEquals(10, myScrollbar.getModel().getMaximum());
  assertEquals(1, myScrollbar.getModel().getValue());
  assertEquals(3, myScrollbar.getModel().getExtent());
  // Update data range.
  myTimeline.getDataRange().set(0, 20000);
  assertEquals(0, myScrollbar.getModel().getMinimum());
  assertEquals(20, myScrollbar.getModel().getMaximum());
  assertEquals(1, myScrollbar.getModel().getValue());
  assertEquals(3, myScrollbar.getModel().getExtent());
}