@Test
public void canOnlySelectOneStackTraceViewAtATime() {

  IntelliJStackTraceGroup group = new IntelliJStackTraceGroup(
    ProjectStub.getInstance(),
    ((project, model) -> IntelliJStackTraceViewTest.createStackTraceView(project, model)));
  StackTraceModel model1 = IntelliJStackTraceViewTest.createStackTraceModel();
  StackTraceModel model2 = IntelliJStackTraceViewTest.createStackTraceModel();
  // IntelliJStackTraceGroup always creates IntelliJStackTraceView instances
  IntelliJStackTraceView view1 = (IntelliJStackTraceView)group.createStackView(model1);
  IntelliJStackTraceView view2 = (IntelliJStackTraceView)group.createStackView(model2);
  model1.setStackFrames(STACK_STRING_A);
  model2.setStackFrames(STACK_STRING_B);
  assertThat(view1.getListView().getSelectedIndex()).isLessThan(0);
  assertThat(view2.getListView().getSelectedIndex()).isLessThan(0);
  view1.getListView().setSelectedIndex(1);
  assertThat(view1.getListView().getSelectedIndex()).isEqualTo(1);
  assertThat(view2.getListView().getSelectedIndex()).isLessThan(0);
  view2.getListView().setSelectedIndex(2);
  assertThat(view1.getListView().getSelectedIndex()).isLessThan(0);
  assertThat(view2.getListView().getSelectedIndex()).isEqualTo(2);
}