@Test
public void testAdjust() {

  // Disable paused so we get proper streaming states.
  myTimeline.setIsPaused(false);
  assertEquals(0, myTimeline.getViewRange().getMin(), EPSILON);
  assertEquals(5000, myTimeline.getViewRange().getMax(), EPSILON);
  myUi.mouse.press(5, 100);
  assertEquals(0, myTimeline.getViewRange().getMin(), EPSILON);
  assertEquals(5000, myTimeline.getViewRange().getMax(), EPSILON);
  myUi.mouse.dragTo(10, 100);
  assertEquals(1000, myTimeline.getViewRange().getMin(), EPSILON);
  assertEquals(6000, myTimeline.getViewRange().getMax(), EPSILON);
  myUi.mouse.release();
  assertEquals(1000, myTimeline.getViewRange().getMin(), EPSILON);
  assertEquals(6000, myTimeline.getViewRange().getMax(), EPSILON);
  // Scroll to the end, and check streaming
  assertFalse(myTimeline.isStreaming());
  myUi.mouse.press(10, 100);
  assertFalse(myTimeline.isStreaming());
  myUi.mouse.dragTo(40, 100);
  assertFalse(myTimeline.isStreaming());
  myUi.mouse.release();
  assertEquals(4000, myTimeline.getViewRange().getMin(), EPSILON);
  assertEquals(9000, myTimeline.getViewRange().getMax(), EPSILON);
  BufferedImage image = new BufferedImage(100, 10, BufferedImage.TYPE_INT_ARGB);
  Graphics graphics = image.getGraphics();
  graphics.setClip(0, 0, 100, 10);
  myScrollbar.paintComponent(graphics);
  assertTrue(myTimeline.isStreaming());
}