ProfilerScrollbar extends JBScrollBar { @VisibleForTesting public boolean isScrollable() { Range viewRange = myTimeline.getViewRange(); Range dataRange = myTimeline.getDataRange(); return viewRange.getMin() >= dataRange.getMin() && viewRange.getMax() <= dataRange.getMax(); } ProfilerScrollbar(@NotNull StreamingTimeline timeline,
                           @NotNull JComponent zoomPanComponent); @VisibleForTesting double getZoomWheelDelta(); @VisibleForTesting double getPanWheelDelta(); @VisibleForTesting boolean isScrollable();  }
@Test public void testNotScrollableIfViewRangeGreaterThatDataRange() { myTimeline.getDataRange().set(0, 100); myTimeline.getViewRange().set(-100, 200); assertFalse(myScrollbar.isScrollable()); myUi.mouse.wheel(50, 50, 1); assertEquals(-100, myTimeline.getViewRange().getMin(), EPSILON); assertEquals(200, myTimeline.getViewRange().getMax(), EPSILON); }