AlertEventService extends AbstractEventService implements AlertMailEventService { @Override public void insert(EventModel eventModel) { EventTbl eventTbl = eventModel.toEventTbl(new Function<String, String>() { @Override public String apply(String s) { return s; } }); if(eventTbl.getDataChangeLastTime() == null) { eventTbl.setDataChangeLastTime(new Date()); } eventDao.insert(eventTbl); }  @Override void insert(EventModel eventModel); @Override @SuppressWarnings("unchecked") List<EventModel> findEventsByTypeAndDate(EventModel.EventType eventType, Date date); @Override List<EventModel> getLastHourAlertEvent();  }
@Test public void insert() { service.insert(new EventModel().setEventDetail("test")); service.insert(new EventModel().setEventType(EventModel.EventType.UNKNOWN).setEventDetail("test")); service.insert(new EventModel().setEventType(EventModel.EventType.UNKNOWN).setEventDetail("test") .setEventOperation(ALERT_TYPE.CLIENT_INCONSIS.name())); service.insert(new EventModel().setEventType(EventModel.EventType.UNKNOWN).setEventDetail("test") .setEventOperator("10.2.81.68")); }