/**
   * @throws JavaModelException
   * @throws CoreException
   */
  @Before
  public void setup() throws JavaModelException, CoreException {

    System.out.println(
        "Setup test project: "
            + ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString());

    //
    _project = ResourcesPlugin.getWorkspace().getRoot().getProject(DEFAULT_JDT_TEST_PROJECT_NAME);

    // create PDE project
    EclipseProjectUtils.createEclipsePluginProject(_project, getImportedPackages());

    //
    IFolder srcFolder = _project.getFolder("src");
    createTestSourceFiles(srcFolder);
    srcFolder.refreshLocal(IResource.DEPTH_INFINITE, null);

    //
    EclipseProjectUtils.enableDsAnnotationNature(_project);

    // TODO: Synchronize
    try {
      Thread.sleep(500);
    } catch (InterruptedException e) {
      // noop
    }

    // refresh and build
    _project.refreshLocal(IResource.DEPTH_INFINITE, null);
    try {
      _project.build(IncrementalProjectBuilder.CLEAN_BUILD, null);
      _project.build(IncrementalProjectBuilder.FULL_BUILD, null);
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    //
    if (failOnErrors()) {
      EclipseProjectUtils.failOnErrors(_project);
    }
  }
  protected String assertComponentDescription(String fileName) throws Exception {
    //
    EclipseProjectUtils.checkFileExists(
        getProject(), Constants.COMPONENT_DESCRIPTION_FOLDER + "/" + fileName);

    InputStream inputStream =
        getProject().getFile(Constants.COMPONENT_DESCRIPTION_FOLDER + "/" + fileName).getContents();

    //
    return fromStream(inputStream);
  }