public List<SelectItem> getProjects() {
    List<SelectItem> projectsList = new ArrayList<SelectItem>();

    String wilosUserId =
        (String) this.webSessionService.getAttribute(WebSessionService.WILOS_USER_ID);
    Participant participant = this.participantService.getParticipant(wilosUserId);

    if (participant != null) {
      HashMap<Project, Boolean> projects =
          this.participantService.getProjectsForAParticipant(participant);
      for (Project project : projects.keySet()) {
        if (projects.get(project)) {
          this.addSelectItemToList(
              projectsList, new SelectItem(project.getId(), project.getConcreteName()));
        }
      }
    }

    ResourceBundle bundle =
        ResourceBundle.getBundle(
            "wilos.resources.messages",
            FacesContext.getCurrentInstance().getApplication().getDefaultLocale());
    projectsList.add(
        0,
        new SelectItem(
            DEFAULT_PROJECT_ID, bundle.getString("navigation.tree.defaulttreenodetext")));
    return projectsList;
  }
 @Test
 public void testDeleteProject() {
   Project p1 = new Project();
   p1.setConcreteName("testProjectToDelete");
   p1.setDescription("testDesc");
   this.pDao.saveOrUpdateProject(p1);
   this.pDao.deleteProject(p1);
   Project pTmp = this.pDao.getProject(p1.getId());
   assertNull(pTmp);
 }
  public ProjectTO(Project _myproject) {
    this.setProcess(new ProcessTO(_myproject.getProcess()));

    this.setDescription(_myproject.getDescription());
    this.setCreationDate(_myproject.getCreationDate());
    this.setLaunchingDate(_myproject.getLaunchingDate());
    this.setIsFinished(_myproject.getIsFinished());
    this.setId(_myproject.getId());
    this.setConcreteName(_myproject.getConcreteName());
    this.setPlannedStartingDate(_myproject.getPlannedStartingDate());
    this.setPlannedFinishingDate(_myproject.getPlannedFinishingDate());
    this.setPlannedTime(_myproject.getPlannedTime());
  }
 @Test
 public void testSaveOrUpdateProject() {
   Project pTmp = new Project();
   this.pDao.saveOrUpdateProject(pTmp);
   assertNotNull(this.pDao.getProject(pTmp.getId()));
 }