diff --git a/src/test/data/JsonSerializableAddressBookTest/duplicatePersonAddressBook.json b/src/test/data/JsonSerializableAddressBookTest/duplicatePersonAddressBook.json index 168eb864029..e5f05b9f1eb 100644 --- a/src/test/data/JsonSerializableAddressBookTest/duplicatePersonAddressBook.json +++ b/src/test/data/JsonSerializableAddressBookTest/duplicatePersonAddressBook.json @@ -8,7 +8,8 @@ "salary": "100000", "claimBudget": "1", "department": "Finance", - "dob": "2002-02-27" + "dob": "2002-02-27", + "leave": "111101010101" }, { "name": "Alice Pauline", @@ -18,7 +19,8 @@ "salary": "100000", "claimBudget": "1", "department": "Finance", - "dob": "2002-02-27" + "dob": "2002-02-27", + "leave": "111101010101" } ] } diff --git a/src/test/data/JsonSerializableAddressBookTest/typicalPersonsAddressBook.json b/src/test/data/JsonSerializableAddressBookTest/typicalPersonsAddressBook.json index c1f67e335cf..3633f1429bc 100644 --- a/src/test/data/JsonSerializableAddressBookTest/typicalPersonsAddressBook.json +++ b/src/test/data/JsonSerializableAddressBookTest/typicalPersonsAddressBook.json @@ -9,7 +9,8 @@ "salary": "10000", "claimBudget": "5000", "department": "Engineering", - "dob": "2000-01-01" + "dob": "2000-01-01", + "leave": "111101010101" }, { "name": "Benson Meier", @@ -19,7 +20,8 @@ "salary": "100", "claimBudget": "5", "department": "Sales", - "dob": "1997-05-05" + "dob": "1997-05-05", + "leave": "010101010101" }, { "name": "Carl Kurz", @@ -29,7 +31,8 @@ "salary": "1000000000000", "claimBudget": "500000", "department": "Executive", - "dob": "1991-12-31" + "dob": "1991-12-31", + "leave": "000101010001" }, { "name": "Daniel Meier", @@ -39,7 +42,8 @@ "salary": "23232323232", "claimBudget": "19191919", "department": "Marketing", - "dob": "1969-07-27" + "dob": "1969-07-27", + "leave": "111111111111" }, { "name": "Elle Meyer", @@ -49,7 +53,8 @@ "salary": "3000", "claimBudget": "200", "department": "HR", - "dob": "1999-06-17" + "dob": "1999-06-17", + "leave": "000000000001" }, { "name": "Fiona Kunz", @@ -59,7 +64,8 @@ "salary": "100000", "claimBudget": "1", "department": "Finance", - "dob": "2002-02-27" + "dob": "2002-02-27", + "leave": "000000100000" }, { "name": "George Best", @@ -69,7 +75,8 @@ "salary": "10000", "claimBudget": "5000", "department": "Engineering", - "dob": "2005-09-30" + "dob": "2005-09-30", + "leave": "111111000000" } ] } diff --git a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java b/src/test/java/seedu/address/logic/commands/CommandTestUtil.java index dbb4ffc0509..552fa60db05 100644 --- a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java +++ b/src/test/java/seedu/address/logic/commands/CommandTestUtil.java @@ -43,6 +43,7 @@ public class CommandTestUtil { public static final String VALID_BUDGET = "2500"; public static final String VALID_DEPARTMENT = "Engineering"; public static final String VALID_DOB = "2000-01-01"; + public static final String VALID_LEAVE = "101010101010"; public static final String VALID_TAG_HUSBAND = "husband"; public static final String VALID_TAG_FRIEND = "friend"; diff --git a/src/test/java/seedu/address/model/person/PersonTest.java b/src/test/java/seedu/address/model/person/PersonTest.java index b0dcf548df8..de93a5098f4 100644 --- a/src/test/java/seedu/address/model/person/PersonTest.java +++ b/src/test/java/seedu/address/model/person/PersonTest.java @@ -89,7 +89,7 @@ public void toStringMethod() { String expected = Person.class.getCanonicalName() + "{name=" + ALICE.getName() + ", phone=" + ALICE.getPhone() + ", email=" + ALICE.getEmail() + ", address=" + ALICE.getAddress() + ", salary=" + ALICE.getSalary() + ", claimBudget=" + ALICE.getClaimBudget() + ", department=" + ALICE.getDepartment() - + ", dob=" + ALICE.getDob() + "}"; + + ", dob=" + ALICE.getDob() + ", leave=" + ALICE.getLeave() + "}"; assertEquals(expected, ALICE.toString()); } } diff --git a/src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java b/src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java index 3914fb00c65..9fb2c844a1d 100644 --- a/src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java +++ b/src/test/java/seedu/address/storage/JsonAdaptedPersonTest.java @@ -12,6 +12,7 @@ import seedu.address.model.person.Birthday; import seedu.address.model.person.Department; import seedu.address.model.person.Email; +import seedu.address.model.person.Leave; import seedu.address.model.person.Money; import seedu.address.model.person.Name; import seedu.address.model.person.Phone; @@ -25,6 +26,7 @@ public class JsonAdaptedPersonTest { private static final String INVALID_BUDGET = "1000000000000000"; private static final String INVALID_DEPARTMENT = " "; private static final String INVALID_DOB = "1"; + private static final String INVALID_LEAVE = "1+"; private static final String VALID_NAME = BENSON.getName().toString(); private static final String VALID_PHONE = BENSON.getPhone().toString(); @@ -34,6 +36,7 @@ public class JsonAdaptedPersonTest { private static final String VALID_BUDGET = BENSON.getClaimBudget().amount; private static final String VALID_DEPARTMENT = BENSON.getDepartment().department; private static final String VALID_DOB = BENSON.getDob().dob; + private static final String VALID_LEAVE = BENSON.getLeave().leave; @Test public void toModelType_validPersonDetails_returnsPerson() throws Exception { @@ -45,7 +48,7 @@ public void toModelType_validPersonDetails_returnsPerson() throws Exception { public void toModelType_invalidName_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(INVALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = Name.MESSAGE_CONSTRAINTS; assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -53,7 +56,7 @@ public void toModelType_invalidName_throwsIllegalValueException() { @Test public void toModelType_nullName_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName()); assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -62,7 +65,7 @@ public void toModelType_nullName_throwsIllegalValueException() { public void toModelType_invalidPhone_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = Phone.MESSAGE_CONSTRAINTS; assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -70,7 +73,7 @@ public void toModelType_invalidPhone_throwsIllegalValueException() { @Test public void toModelType_nullPhone_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, null, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()); assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -79,7 +82,7 @@ public void toModelType_nullPhone_throwsIllegalValueException() { public void toModelType_invalidEmail_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, INVALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = Email.MESSAGE_CONSTRAINTS; assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -87,7 +90,7 @@ public void toModelType_invalidEmail_throwsIllegalValueException() { @Test public void toModelType_nullEmail_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, null, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()); assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -96,7 +99,7 @@ public void toModelType_nullEmail_throwsIllegalValueException() { public void toModelType_invalidAddress_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, INVALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = Address.MESSAGE_CONSTRAINTS; assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -104,7 +107,7 @@ public void toModelType_invalidAddress_throwsIllegalValueException() { @Test public void toModelType_nullAddress_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, null, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()); assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -113,7 +116,7 @@ public void toModelType_nullAddress_throwsIllegalValueException() { public void toModelType_invalidSalary_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - INVALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + INVALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = Money.MESSAGE_CONSTRAINTS; assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -121,7 +124,7 @@ public void toModelType_invalidSalary_throwsIllegalValueException() { @Test public void toModelType_nullSalary_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - null, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + null, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Money.class.getSimpleName()); assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -130,7 +133,7 @@ public void toModelType_nullSalary_throwsIllegalValueException() { public void toModelType_invalidBudget_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, INVALID_BUDGET, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, INVALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = Money.MESSAGE_CONSTRAINTS; assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -138,7 +141,7 @@ public void toModelType_invalidBudget_throwsIllegalValueException() { @Test public void toModelType_nullBudget_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, null, VALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, null, VALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Money.class.getSimpleName()); assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -147,7 +150,7 @@ public void toModelType_nullBudget_throwsIllegalValueException() { public void toModelType_invalidDepartment_throwsIllegalValueException() throws Exception { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, INVALID_DEPARTMENT, VALID_DOB); + VALID_SALARY, VALID_BUDGET, INVALID_DEPARTMENT, VALID_DOB, VALID_LEAVE); String expectedMessage = Department.MESSAGE_CONSTRAINTS; assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -155,7 +158,7 @@ public void toModelType_invalidDepartment_throwsIllegalValueException() throws E @Test public void toModelType_nullDepartment_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, null, VALID_DOB); + VALID_SALARY, VALID_BUDGET, null, VALID_DOB, VALID_LEAVE); String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Department.class.getSimpleName()); assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -164,7 +167,7 @@ public void toModelType_nullDepartment_throwsIllegalValueException() { public void toModelType_invalidDob_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, INVALID_DOB); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, INVALID_DOB, VALID_LEAVE); String expectedMessage = Birthday.MESSAGE_CONSTRAINTS; assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } @@ -172,9 +175,26 @@ public void toModelType_invalidDob_throwsIllegalValueException() { @Test public void toModelType_nullDob_throwsIllegalValueException() { JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, - VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, null); + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, null, VALID_LEAVE); String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Birthday.class.getSimpleName()); assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); } + @Test + public void toModelType_invalidLeave_throwsIllegalValueException() { + JsonAdaptedPerson person = + new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, INVALID_LEAVE); + String expectedMessage = Leave.MESSAGE_CONSTRAINTS; + assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); + } + + @Test + public void toModelType_nullLeave_throwsIllegalValueException() { + JsonAdaptedPerson person = new JsonAdaptedPerson(VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, + VALID_SALARY, VALID_BUDGET, VALID_DEPARTMENT, VALID_DOB, null); + String expectedMessage = String.format(MISSING_FIELD_MESSAGE_FORMAT, Leave.class.getSimpleName()); + assertThrows(IllegalValueException.class, expectedMessage, person::toModelType); + } + } diff --git a/src/test/java/seedu/address/testutil/PersonBuilder.java b/src/test/java/seedu/address/testutil/PersonBuilder.java index 267e1c3eeed..b354bae3913 100644 --- a/src/test/java/seedu/address/testutil/PersonBuilder.java +++ b/src/test/java/seedu/address/testutil/PersonBuilder.java @@ -4,6 +4,7 @@ import seedu.address.model.person.Birthday; import seedu.address.model.person.Department; import seedu.address.model.person.Email; +import seedu.address.model.person.Leave; import seedu.address.model.person.Money; import seedu.address.model.person.Name; import seedu.address.model.person.Person; @@ -22,6 +23,7 @@ public class PersonBuilder { public static final String DEFAULT_BUDGET = "2500"; public static final String DEFAULT_DEPARTMENT = "Engineering"; public static final String DEFAULT_DOB = "2000-01-01"; + public static final String DEFAULT_LEAVE = "000000000000"; private Name name; private Phone phone; @@ -31,6 +33,7 @@ public class PersonBuilder { private Money claimBudget; private Department department; private Birthday dob; + private Leave leave; /** * Creates a {@code PersonBuilder} with the default details. @@ -44,6 +47,7 @@ public PersonBuilder() { claimBudget = new Money(DEFAULT_BUDGET); department = new Department(DEFAULT_DEPARTMENT); dob = new Birthday(DEFAULT_DOB); + leave = new Leave(DEFAULT_LEAVE); } /** @@ -58,6 +62,7 @@ public PersonBuilder(Person personToCopy) { claimBudget = personToCopy.getClaimBudget(); department = personToCopy.getDepartment(); dob = personToCopy.getDob(); + leave = personToCopy.getLeave(); } /** @@ -131,6 +136,14 @@ public PersonBuilder withDob(String dob) { return this; } + /** + * Sets the {@code Leave} of the {@code Person} that we are building. + */ + public PersonBuilder withLeave(String leave) { + this.leave = new Leave(leave); + return this; + } + public Person build() { return new Person(name, phone, email, address, salary, claimBudget, department, dob); } diff --git a/src/test/java/seedu/address/testutil/TypicalPersons.java b/src/test/java/seedu/address/testutil/TypicalPersons.java index 9d6b8a82a7a..b505828fdf8 100644 --- a/src/test/java/seedu/address/testutil/TypicalPersons.java +++ b/src/test/java/seedu/address/testutil/TypicalPersons.java @@ -7,6 +7,7 @@ import static seedu.address.logic.commands.CommandTestUtil.VALID_DOB; import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY; import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB; +import static seedu.address.logic.commands.CommandTestUtil.VALID_LEAVE; import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY; import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB; import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY; @@ -28,52 +29,52 @@ public class TypicalPersons { public static final Person ALICE = new PersonBuilder().withName("Alice Pauline") .withAddress("123, Jurong West Ave 6, #08-111").withEmail("alice@example.com") .withPhone("94351253").withSalary("10000").withClaimBudget("5000").withDepartment("Engineering") - .withDob("2000-01-01").build(); + .withDob("2000-01-01").withLeave("111101010101").build(); public static final Person BENSON = new PersonBuilder().withName("Benson Meier") .withAddress("311, Clementi Ave 2, #02-25") .withEmail("johnd@example.com").withPhone("98765432") .withSalary("100").withClaimBudget("5").withDepartment("Sales") - .withDob("1997-05-05").build(); + .withDob("1997-05-05").withLeave("010101010101").build(); public static final Person CARL = new PersonBuilder().withName("Carl Kurz").withPhone("95352563") .withEmail("heinz@example.com").withAddress("wall street") .withSalary("1000000000000").withClaimBudget("500000").withDepartment("Executive") - .withDob("1991-12-31").build(); + .withDob("1991-12-31").withLeave("000101010001").build(); public static final Person DANIEL = new PersonBuilder().withName("Daniel Meier").withPhone("87652533") .withEmail("cornelia@example.com").withAddress("10th street") .withSalary("23232323232").withClaimBudget("19191919").withDepartment("Marketing") - .withDob("1969-07-27").build(); + .withDob("1969-07-27").withLeave("111111111111").build(); public static final Person ELLE = new PersonBuilder().withName("Elle Meyer").withPhone("9482224") .withEmail("werner@example.com").withAddress("michegan ave") .withSalary("3000").withClaimBudget("200").withDepartment("HR") - .withDob("1999-06-17").build(); + .withDob("1999-06-17").withLeave("000000000001").build(); public static final Person FIONA = new PersonBuilder().withName("Fiona Kunz").withPhone("9482427") .withEmail("lydia@example.com").withAddress("little tokyo") .withSalary("100000").withClaimBudget("1").withDepartment("Finance") - .withDob("2002-02-27").build(); + .withDob("2002-02-27").withLeave("000000100000").build(); public static final Person GEORGE = new PersonBuilder().withName("George Best").withPhone("9482442") .withEmail("anna@example.com").withAddress("4th street") .withSalary("10000").withClaimBudget("5000").withDepartment("Engineering") - .withDob("2005-09-30").build(); + .withDob("2005-09-30").withLeave("111111000000").build(); // Manually added public static final Person HOON = new PersonBuilder().withName("Hoon Meier").withPhone("8482424") .withEmail("stefan@example.com").withAddress("little india") .withSalary("10000").withClaimBudget("5000").withDepartment("Engineering") - .withDob("2000-01-01").build(); + .withDob("2000-01-01").withLeave("000000000000").build(); public static final Person IDA = new PersonBuilder().withName("Ida Mueller").withPhone("8482131") .withEmail("hans@example.com").withAddress("chicago ave") .withSalary("10000").withClaimBudget("5000").withDepartment("Engineering") - .withDob("2000-01-01").build(); + .withDob("2000-01-01").withLeave("111000111000").build(); // Manually added - Person's details found in {@code CommandTestUtil} public static final Person AMY = new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY) .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withSalary(VALID_SALARY) .withClaimBudget(VALID_BUDGET).withDepartment(VALID_DEPARTMENT).withDob(VALID_DOB) - .build(); + .withLeave(VALID_LEAVE).build(); public static final Person BOB = new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB) .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withSalary(VALID_SALARY) .withClaimBudget(VALID_BUDGET).withDepartment(VALID_DEPARTMENT).withDob(VALID_DOB) - .build(); + .withLeave(VALID_LEAVE).build(); public static final String KEYWORD_MATCHING_MEIER = "Meier"; // A keyword that matches MEIER