protected void showMessage( String message, boolean scroll ) {
    try {
      XulMessageBox box = (XulMessageBox) document.createElement( "messagebox" );
      box.setMessage( message );
      box.setModalParent( ( (XulRoot) document.getElementById( "general-datasource-window" ) ).getRootObject() );
      if ( scroll ) {
        box.setScrollable( true );
        box.setWidth( 500 );
        box.setHeight( 400 );
      }
      box.open();
    } catch ( XulException e ) {
      System.out.println( "Error creating messagebox " + e.getMessage() );
    }
  }
@Test
  public void testShowMessage() throws Exception {
    dataHandler.showMessage( "MyMessage", false );
    dataHandler.showMessage( "MyMessage", true );
    when( document.createElement( "messagebox" ) ).thenThrow( new XulException() );
    dataHandler.showMessage( "MyMessage", false );
  }