@Before
 public void prepareWorkspace() {
   if (!projectHelper.projectExists(PROJECT_NAME)) {
     CDIProjectWizard cw = new CDIProjectWizard();
     cw.open();
     WebProjectFirstPage fp = new WebProjectFirstPage();
     fp.setProjectName(PROJECT_NAME);
     fp.setTargetRuntime(sr.getRuntimeNameLabelText(sr.getConfig()));
     cw.finish();
     new WaitUntil(new JobIsRunning(), TimePeriod.NORMAL, false);
     new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
   }
 }
  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();
  }