private void assertRuntimeProperlyConfiguredInDialog() {
    assertTrue(
        "JBoss WS Runtime name was not automatically generated",
        jbossWsRuntimeDialog.getName() != null && !jbossWsRuntimeDialog.getName().isEmpty());

    assertThat(
        jbossWsRuntimeDialog.getRuntimeImplementation(),
        Is.is("JBoss Web Services - Stack CXF Runtime Client"));

    String runtimeVersion = jbossWsRuntimeDialog.getRuntimeVersion();

    String expectedVersion;
    switch (serverReq.getConfig().getServerFamily().getLabel()) {
      case "WildFly":
        expectedVersion = "4.2.4.Final";
        break;
      case "JBoss Enterprise Application Platform":
        expectedVersion = "4.2.3.Final-redhat-1";
        break;
      case "JBoss AS":
        expectedVersion = "4.0.2.GA";
        break;
      default:
        fail("Server was not recognized");
        expectedVersion = "";
    }
    assertTrue(
        "Unknown runtime version: " + runtimeVersion,
        Is.is(expectedVersion).matches(runtimeVersion));
  }
  private void setRuntimeHomeFolderAccordingToRuntime() {
    jbossWsRuntimeDialog.setHomeFolder(serverReq.getConfig().getRuntime());

    runtimeName = jbossWsRuntimeDialog.getName();
    runtimeVersion = jbossWsRuntimeDialog.getVersion();
    runtimePath = jbossWsRuntimeDialog.getHomeFolder();
  }
  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);
  }