package tars.testutil;

import tars.commons.exceptions.IllegalValueException;
import tars.model.task.*;
import tars.model.tag.Tag;

/**
 *
 */
public class TaskBuilder {

    private TestTask task;

    public TaskBuilder() {
        this.task = new TestTask();
    }

    public TaskBuilder withName(String name) throws IllegalValueException {
        this.task.setName(new Name(name));
        return this;
    }

    public TaskBuilder withTags(String ... tags) throws IllegalValueException {
        for (String tag: tags) {
            task.getTags().add(new Tag(tag));
        }
        return this;
    }

    public TaskBuilder withAddress(String address) throws IllegalValueException {
        this.task.setAddress(new Address(address));
        return this;
    }

    public TaskBuilder withPhone(String phone) throws IllegalValueException {
        this.task.setPhone(new Phone(phone));
        return this;
    }

    public TaskBuilder withEmail(String email) throws IllegalValueException {
        this.task.setEmail(new Email(email));
        return this;
    }

    public TestTask build() {
        return this.task;
    }

}

@@ -637,30 +637,32 @@
 with
-Address(String address
+DateTime(String dateTime
 ) th
@@ -715,35 +715,42 @@
 .set
-Address(new Address(address
+DateTime(new DateTime(dateTime, %22%22
 ));%0A
@@ -805,20 +805,23 @@
 er withP
-hone
+riority
 (String 
@@ -821,20 +821,23 @@
 String p
-hone
+riority
 ) throws
@@ -887,180 +887,37 @@
 setP
-hone(new Phone(phone));%0A        return this;%0A    %7D%0A%0A    public TaskBuilder withEmail(String email) throws IllegalValueException %7B%0A        this.task.setEmail(new Email(email
+riority(new Priority(priority
 ));%0A

Add methods withDateTime(String) and withPriority(String)