private void testJBossWSRuntimeDeletion() {
    jbossWSRuntimePreferencePage.select(0);
    jbossWSRuntimePreferencePage.remove();

    new WaitUntil(new ShellWithTextIsActive("Confirm Runtime Delete"));
    new PushButton("OK").click();
    new WaitWhile(new ShellWithTextIsActive("Confirm Runtime Delete"));

    assertThat(jbossWSRuntimePreferencePage.getAllJBossWSRuntimes().size(), Is.is(0));
  }
  private void testJBossWSRuntimeEdition() {
    jbossWSRuntimePreferencePage.select(0);
    jbossWSRuntimePreferencePage.edit();

    jbossWsRuntimeDialog = new JBossWSRuntimeListFieldEditor(true);

    jbossWsRuntimeDialog.setName(runtimeEditedName);
    jbossWsRuntimeDialog.finish();

    new WaitWhile(new ShellWithTextIsActive(EDIT_JBOSS_WS_RUNTIME_DIALOG_TITLE));

    assertRuntimeName(runtimeEditedName);
  }
  private void assertRuntimeConfiguredAccordingToRuntime() {
    jbossWsRuntimeDialog.finish();

    new WaitWhile(new ShellWithTextIsActive(NEW_JBOSS_WS_RUNTIME_DIALOG_TITLE));

    assertThat(jbossWSRuntimePreferencePage.getAllJBossWSRuntimes().size(), Is.is(1));

    JBossWSRuntimeItem item =
        jbossWSRuntimePreferencePage.getAllJBossWSRuntimes().iterator().next();
    assertRuntimeName(item, runtimeName);
    assertRuntimeVersion(item, runtimeVersion);
    assertRuntimePath(item, runtimePath);
  }
  private void testJBossWSGenerating() {
    jbossWSRuntimePreferencePage.add();
    jbossWsRuntimeDialog = new JBossWSRuntimeListFieldEditor(false);

    setRuntimeHomeFolderAccordingToRuntime();
    assertRuntimeProperlyConfiguredInDialog();
    assertRuntimeConfiguredAccordingToRuntime();
  }
 private void assertRuntimeName(String expectedName) {
   assertRuntimeName(jbossWSRuntimePreferencePage.getAllJBossWSRuntimes().get(0), expectedName);
 }