JobEvent extends AbstractEvent { public JobEvent(final long timestamp, final JobStatus currentJobStatus, final String optionalMessage) { super(timestamp); this.currentJobStatus = currentJobStatus; this.optionalMessage = optionalMessage; } JobEvent(final long timestamp, final JobStatus currentJobStatus, final String optionalMessage);  JobEvent(); @Override void read(final DataInput in); @Override void write(final DataOutput out); JobStatus getCurrentJobStatus(); String getOptionalMessage(); String toString(); @Override boolean equals(final Object obj); @Override int hashCode();  }
@Test public void testJobEvent() { try { final JobEvent orig = new JobEvent(1234567L, JobStatus.FINISHED, null); final JobEvent copy = (JobEvent) CommonTestUtils.createCopy(orig); assertEquals(orig.getTimestamp(), copy.getTimestamp()); assertEquals(orig.getCurrentJobStatus(), copy.getCurrentJobStatus()); assertEquals(orig.hashCode(), copy.hashCode()); assertTrue(orig.equals(copy)); } catch (IOException ioe) { fail(ioe.getMessage()); } }