/**
   * Perform pre-test initialization.
   *
   * @throws Exception if the initialization fails for some reason
   */
  @Before
  public void setUp() throws Exception {
    TestUtils.deleteFolderContent(new File("output"));
    ServerContext.resetServerContext();
    this.model = ServerContext.getInstance().getPersistenceManager().getCurrentModel();
    this.model.setUuidManager(new IDGenerator());
    try {
      new RelationType(this.model, "Abhängig von");
      new RelationType(this.model, "Siehe auch");

    } catch (final IPScrumGeneralException e) {
      e.printStackTrace();
    }
  }
  /**
   * Perform pre-test initialization.
   *
   * @throws Exception if the initialization fails for some reason
   */
  @SuppressWarnings("unchecked")
  @Before
  public void setUp() throws Exception {
    ServerContext.resetServerContext();
    this.model = ServerContext.getInstance().getPersistenceManager().getCurrentModel();
    this.model.setUuidManager(new IDGenerator());

    this.test = new Project(this.model, "Test");
    this.pbltest = this.test.getBacklog();
    this.per1 = new Person(this.model, "Max", "Mustermann");
    this.per2 = new Person(this.model, "Karin", "Katze");
    this.type = new FeatureTicketType(this.model, "Type", "TestType");
    this.pbi1 = new Feature(this.model, this.type, "A", "Test1", this.pbltest);
    this.pbi2 = new Feature(this.model, this.type, "B", "Test2", this.pbltest);
    this.pbi3 = new Feature(this.model, this.type, "C", "Test3", this.pbltest);
    this.pbi4 = new Feature(this.model, this.type, "D", "Test4", this.pbltest);
    this.task = this.model.getTypeManager().getStandardTaskType();
    this.team1 = new Team(this.model, "Team");
    this.team1.addProject(this.test);
    this.sprint =
        new Sprint(
            this.model, "Sprint", "Beschreibung", new Date(), new Date(), this.team1, this.test);
    this.sprintbl = this.sprint.getSprintBacklog();
    this.t1 = new Task(this.model, this.task, "Task 1", "Beschreibung", this.sprintbl);
    this.t6 = new Task(this.model, this.task, "Task 6", "Assigend", this.sprintbl);

    this.team1.addMember(this.per1);
    this.team1.addMember(this.per2);
    this.pbi1.setSprint(this.sprint);
    this.pbi2.setSprint(this.sprint);
    this.pbi3.setSprint(this.sprint);
    this.pbi4.setSprint(this.sprint);

    this.t6.changeState(this.model.getTypeManager().getInProcess());
    this.t6.setResponsibility(this.per1);

    this.listField = new ListField<Serializable>(this.model, this.model.getAllFieldTypes().get(0));
    final TextFieldType hintsFieldType = this.pbi1.getTicketType().getHintsType();
    this.pbi1HintsField =
        (ListField<String>) this.t1.getTicketType().getField(hintsFieldType, this.pbi1);
  }