@Test
public void selectingTreeNodeChangesDescriptionPanel() {

  JPanel toolPanel = toolWindow.getContent();
  Component[] components = toolPanel.getComponents();
  OnePixelSplitter splitter = (OnePixelSplitter) components[0];
  JBScrollPane leftPane = (JBScrollPane) splitter.getFirstComponent();
  JViewport leftView = leftPane.getViewport();
  Tree suggestionTree = (Tree) leftView.getView();
  JPanel rightPane = (JPanel) splitter.getSecondComponent();
  assertThat(suggestionTree.getSelectionCount()).isEqualTo(0);
  for (Component component : rightPane.getComponents()) {
    if (component instanceof JButton
        || component instanceof JBLabel
        || component instanceof HyperlinkLabel) {
      assertThat(component.isVisible()).isFalse();
    }
  }
  TreePath webPPath = getTreePathWithString(suggestionTree, webPSuggestionData.toString());
  suggestionTree.addSelectionPath(webPPath);
  assertThat(suggestionTree.getSelectionCount()).isEqualTo(1);
  for (Component component : rightPane.getComponents()) {
    if (component instanceof JButton
        || component instanceof JBLabel
        || component instanceof HyperlinkLabel) {
      assertThat(component.isVisible()).isTrue();
    }
    if (component instanceof JButton) {
      assertThat(((JButton) component).getText()).isEqualTo(webPSuggestionData.getAutoFixTitle());
    }
    if (component instanceof JBLabel) {
      assertThat(((JBLabel) component).getText())
          .containsMatch(
              "(" + webPSuggestionData.getTitle() + "|" + webPSuggestionData.getDesc() + ")");
    }
  }
}