private void buildTree() {
    if (root != null) {
      return;
    }

    log.debug("Starting buildTree()");

    root = new TreeRepository("", "", filter, "root");

    /*get list of production repos*/
    for (RepositoryConfiguration repoConfig : getRepositories()) {
      String prName = repoConfig.getName();
      TreeRepository productionRepository =
          new TreeRepository(prName, prName, filter, UiConst.TYPE_PRODUCTION_REPOSITORY);
      productionRepository.setData(null);

      root.addChild(prName, productionRepository);

      /*Get repo's deployment configs*/
      IFilter<AProjectArtefact> filter = this.filter;
      List<AProjectFolder> repoList = getPRepositoryProjects(repoConfig);
      Collections.sort(repoList, RepositoryUtils.ARTEFACT_COMPARATOR);

      for (AProjectFolder project : repoList) {
        TreeProductionDProject tpdp =
            new TreeProductionDProject(
                "" + project.getName().hashCode(), project.getName(), filter);
        tpdp.setData(project);
        tpdp.setParent(productionRepository);
        productionRepository.add(tpdp);
      }
    }

    log.debug("Finishing buildTree()");
  }
 private AProject makeProject() throws ProjectException {
   AProject project = new AProject(new MockFolder(PROJECT_NAME));
   AProjectFolder folder1 = project.addFolder(FOLDER1);
   folder1.addResource(FILE1_1, new ByteArrayInputStream(new byte[10]));
   folder1.addResource(FILE1_2, new ByteArrayInputStream(new byte[20]));
   project.addFolder(FOLDER2);
   return project;
 }