### Question:
EventReporter implements Publisher { public Event reportStudentLeaRelationshipEvent(EventAction action) throws ADKException { LOG.info("StudentLeaRelationship " + action.toString()); StudentLEARelationship studentLeaRelationship = SifEntityGenerator.generateTestStudentLeaRelationship(); if (action == EventAction.CHANGE) { studentLeaRelationship.setChanged(); studentLeaRelationship.setGradeLevel(GradeLevelCode._09); } Event event = new Event(studentLeaRelationship, 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 runReportStudentLeaRelationshipEventTests() throws ADKException { Class<? extends SIFDataObject> expectedClass = StudentLEARelationship.class; String expectedId = SifEntityGenerator.TEST_STUDENTLEARELATIONSHIP_REFID; EventAction eventAction = EventAction.ADD; Event sentEvent = eventReporter.reportStudentLeaRelationshipEvent(eventAction); StudentLEARelationship dataObject = (StudentLEARelationship) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals(GradeLevelCode._10.getValue(), dataObject.getGradeLevel().getCode()); eventAction = EventAction.CHANGE; sentEvent = eventReporter.reportStudentLeaRelationshipEvent(eventAction); dataObject = (StudentLEARelationship) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, true); Assert.assertEquals(GradeLevelCode._09.getValue(), dataObject.getGradeLevel().getCode()); eventAction = EventAction.DELETE; sentEvent = eventReporter.reportStudentLeaRelationshipEvent(eventAction); dataObject = (StudentLEARelationship) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals(GradeLevelCode._10.getValue(), dataObject.getGradeLevel().getCode()); }