@Test
public void should_throw_InvalidAttendanceException_given_leave_with_different_workday() {

    LocalDate anotherWorkDay = LocalDate.of(2019, 12, 25);
    Leave leave = Leave.of(employeeId, anotherWorkDay, LeaveType.Sick);
    Attendance attendance = new Attendance(employeeId, workDay);
    assertThatThrownBy(() -> attendance.assureStatus(notHoliday, null, leave))
            .isInstanceOf(InvalidAttendanceException.class)
            .hasMessageContaining("different work day for attendance, time card and leave");
}