public void testUnsupportedParams() throws Exception {
    Window uispecDialog = createUISpecWindow(JOB_WITH_UNSUPPORTED_PARAMS);

    TextBox runTextBox = uispecDialog.getTextBox(ComponentMatchers.componentLabelFor("run"));
    assertTrue(runTextBox.textEquals("RunParameterDefinition is unsupported."));
    assertTrue(runTextBox.iconEquals(GuiUtil.loadIcon("error.png")));

    assertFalse(uispecDialog.getButton("OK").isEnabled());
  }
  public void testUnknowParams() throws Exception {
    Window uispecDialog = createUISpecWindow(JOB_WITH_UNKNOWN_PARAMS);

    TextBox runTextBox = uispecDialog.getTextBox(ComponentMatchers.componentLabelFor("run"));
    assertTrue(runTextBox.textEquals("Unkown parameter"));
    assertTrue(runTextBox.iconEquals(GuiUtil.loadIcon("error.png")));

    assertFalse(uispecDialog.getButton("OK").isEnabled());
  }
  private void checkClickOnHyperlink(String html, String link, String expectedTarget)
      throws Exception {
    JTextPane textPane = createTextPane(html);
    DummyHyperlinkListener listener = new DummyHyperlinkListener();
    textPane.addHyperlinkListener(listener);
    TextBox textComponent = new TextBox(textPane);
    textComponent.clickOnHyperlink(link);
    assertEquals(1, listener.getCallCount());
    assertEquals(expectedTarget, listener.getLastEvent().getDescription());

    listener.reset();
    textComponent.triggerClickOnHyperlink(link).run();
    assertEquals(1, listener.getCallCount());
    assertEquals(expectedTarget, listener.getLastEvent().getDescription());
  }