@@ -0,0 +1,1574 @@
+package asa.service.impl;%0A%0Aimport asa.service.ConstantsInterface;%0Aimport asa.service.AppointmentService;%0Aimport asa.dao.ScheduleDAO ;%0Aimport asa.bean.Appointment;%0Aimport asa.model.Schedule;%0Aimport org.springframework.stereotype.Service;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.BeanUtils;%0Aimport java.util.*;%0A%0A%0A@Service(%22appointmentService%22)%0Apublic class AppointmentServiceImpl implements ConstantsInterface,AppointmentService%7B%0A%09%0A%09@Autowired%0A%09private ScheduleDAO scheduleDAO;%09%09%0A%09%09%0A    public List%3CAppointment%3E get()%7B%0A%09List%3CAppointment%3E list = new ArrayList%3C%3E();%0A%09List%3CSchedule%3E queried = scheduleDAO.findAll();%0A%09queried.forEach(query-%3E%7B%0A%09%09Appointment appointment = new Appointment();%0A%09%09BeanUtils.copyProperties(query,appointment);%0A%09%09list.add(appointment);%0A%09%7D);%0A%09    %0A%09  return list;%0A    %7D%0A%09%0A%09public List%3CAppointment%3E getByDate(String date)%7B%0A%09List%3CAppointment%3E list = new ArrayList%3C%3E();%0A%09List%3CSchedule%3E queried = scheduleDAO.findByDate(date);%0A%09queried.forEach(query-%3E%7B%0A%09%09Appointment appointment = new Appointment();%0A%09%09BeanUtils.copyProperties(query,appointment);%0A%09%09list.add(appointment);%0A%09%7D);%0A%09    %0A%09  return list;%0A    %7D%0A%0A    %0A%09public boolean add(Appointment appointment)%7B%0A%09Schedule schedule= new Schedule();%0A      BeanUtils.copyProperties(appointment,schedule);%0A%09System.out.println(appointment.getDate()+%22 - %22+schedule.getDate());%0A     %0A       if(scheduleDAO.insert(schedule)==null)%7B%0A       %09%09System.out.println(%22add Appointment failed%22);%0A        %09return false;%0A       %7D%0A%09%09%0A      //success%0A      return true;%0A    %7D%0A%09%0A%7D%0A

Create AppointmentServiceMock.java