@Test
public void clickingOnARequestSelectsIt() {

  Range selection = myStageView.getStage().getTimeline().getSelectionRange();
  // The following selection puts threads in the first and second rows on the left
  // half of the view. The right half is mostly blank.
  selection.set(0, TimeUnit.SECONDS.toMicros(44));
  int badX = myThreadsView.getComponent().getWidth() - 1;
  int goodX = getTable().getColumnModel().getColumn(0).getWidth() + 10;
  int goodY = getTable().getRowHeight() / 2;
  assertNull(myStageView.getStage().getSelectedConnection());
  // Click on empty space - doesn't select anything
  myUi.mouse.click(badX, goodY);
  assertNull(myStageView.getStage().getSelectedConnection());
  myUi.mouse.click(goodX, goodY);
  assertNotNull(myStageView.getStage().getSelectedConnection());
  // After clicking on a request, clicking on empty space doesn't deselect
  myUi.mouse.click(badX, goodY);
  assertNotNull(myStageView.getStage().getSelectedConnection());
}