@Test
public void testHide() throws Exception {

  Thread thrd = new Thread( dialog::show );
  thrd.start();
  int tries = 10;
  while ( dialog.isHidden() ) {
    tries--;
    if ( tries == 0 ) {
      break;
    }
    Thread.sleep( 300 );
  }
  assertTrue( !dialog.isHidden() );
  dialog.hide();
  assertTrue( dialog.isHidden() );
}