class BreakTimeServiceImpl implements BreakTimeService {

    @Override
    public BreakTime save(BreakTime breakTime) {
        log.info(LogMessage.IN_SAVE, breakTime);

        if (breakTime.getEndTime().getHour() < breakTime.getStartTime().getHour()) {
            throw new BadRequestException(ErrorMessage.END_TIME_LATE_THAN_START_TIME);
        }

        return repo.save(breakTime);
    }

}