### Question:
EventReporter implements Publisher { public Event reportLeaInfoEvent(EventAction action) throws ADKException { LOG.info("LeaInfo " + action.toString()); LEAInfo leaInfo = SifEntityGenerator.generateTestLEAInfo(); if (action == EventAction.CHANGE) { leaInfo.setChanged(); leaInfo.setLEAURL("http: } Event event = new Event(leaInfo, action); zone.reportEvent(event); return event; } EventReporter(Zone zone); static void main(String[] args); List<Event> runReportScript(String script, long waitTime); Event reportLeaInfoEvent(EventAction action); Event reportSchoolInfoEvent(EventAction action); Event reportStudentPersonalEvent(EventAction action); Event reportStudentLeaRelationshipEvent(EventAction action); Event reportStudentSchoolEnrollmentEvent(EventAction action); Event reportStaffPersonalEvent(EventAction action); Event reportEmployeePersonalEvent(EventAction action); Event reportStaffAssignmentEvent(EventAction action); Event reportEmploymentRecordEvent(EventAction action); Event reportEmployeeAssignmentEvent(EventAction action); Event reportEvent(String messageFile, String eventAction); @Override void onRequest(DataObjectOutputStream out, Query query, Zone zone, MessageInfo info); static final Logger LOG; }### Answer:
@Test public void runReportLeaInfoEventTests() throws ADKException { Class<? extends SIFDataObject> expectedClass = LEAInfo.class; String expectedId = SifEntityGenerator.TEST_LEAINFO_REFID; EventAction eventAction = EventAction.ADD; Event sentEvent = eventReporter.reportLeaInfoEvent(eventAction); LEAInfo dataObject = (LEAInfo) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals("http: eventAction = EventAction.CHANGE; sentEvent = eventReporter.reportLeaInfoEvent(eventAction); dataObject = (LEAInfo) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, true); Assert.assertEquals("http: eventAction = EventAction.DELETE; sentEvent = eventReporter.reportLeaInfoEvent(eventAction); dataObject = (LEAInfo) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals("http: }