### Question:
JobInfo implements Writable { public JobInfo() {} JobInfo();  JobInfo(org.apache.hadoop.mapreduce.JobID id, 
      Text user,
      Path jobSubmitDir); org.apache.hadoop.mapreduce.JobID getJobID(); Text getUser(); Path getJobSubmitDir(); void readFields(DataInput in); void write(DataOutput out);  }### Answer:
@Test (timeout=5000) public void testJobInfo() throws IOException { JobID jid = new JobID("001", 1); Text user = new Text("User"); Path path = new Path("/tmp/test"); JobInfo info = new JobInfo(jid, user, path); ByteArrayOutputStream out = new ByteArrayOutputStream(); info.write(new DataOutputStream(out)); JobInfo copyinfo = new JobInfo(); copyinfo.readFields(new DataInputStream(new ByteArrayInputStream(out .toByteArray()))); assertEquals(info.getJobID().toString(), copyinfo.getJobID().toString()); assertEquals(info.getJobSubmitDir().getName(), copyinfo.getJobSubmitDir() .getName()); assertEquals(info.getUser().toString(), copyinfo.getUser().toString()); }