### Question:
EventReporter implements Publisher { public Event reportEmploymentRecordEvent(EventAction action) throws ADKException { LOG.info("EmploymentRecord " + action.toString()); EmploymentRecord employmentRecord = SifEntityGenerator.generateTestEmploymentRecord(); if (action == EventAction.CHANGE) { employmentRecord.setChanged(); employmentRecord.setPositionNumber("15"); } Event event = new Event(employmentRecord, 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 runReportEmploymentRecordEventTests() throws ADKException { Class<? extends SIFDataObject> expectedClass = EmploymentRecord.class; String expectedId = SifEntityGenerator.TEST_EMPLOYMENTRECORD_REFID; EventAction eventAction = EventAction.ADD; Event sentEvent = eventReporter.reportEmploymentRecordEvent(eventAction); EmploymentRecord dataObject = (EmploymentRecord) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals("10", dataObject.getPositionNumber()); eventAction = EventAction.CHANGE; sentEvent = eventReporter.reportEmploymentRecordEvent(eventAction); dataObject = (EmploymentRecord) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, true); Assert.assertEquals("15", dataObject.getPositionNumber()); eventAction = EventAction.DELETE; sentEvent = eventReporter.reportEmploymentRecordEvent(eventAction); dataObject = (EmploymentRecord) runDataObjectEventTest(sentEvent, eventAction, expectedClass, expectedId, false); Assert.assertEquals("10", dataObject.getPositionNumber()); }