@Test
public void testToolBarSet() {

    JXRootPane rootPane = new JXRootPane();
    JToolBar toolBar = new JToolBar();
    rootPane.setToolBar(toolBar);
    assertTrue(SwingUtilities.isDescendingFrom(toolBar, rootPane));
    rootPane.setToolBar(new JToolBar());
    assertFalse(SwingUtilities.isDescendingFrom(toolBar, rootPane));
}