Source:
<code>public void jobHistory() throws Exception { assertTrue(mTableMaster.getAllTransformJobInfo().isEmpty()); long jobId1 = transform(TABLE1, DEFINITION1); long jobId2 = transform(TABLE2, DEFINITION2); long jobId3 = transform(TABLE3, DEFINITION1); assertEquals(3, mTableMaster.getAllTransformJobInfo().size()); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId1), TABLE1, DEFINITION1, jobId1, Status.RUNNING, null); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId2), TABLE2, DEFINITION2, jobId2, Status.RUNNING, null); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId3), TABLE3, DEFINITION1, jobId3, Status.RUNNING, null); mockJobStatus(jobId1, Status.COMPLETED, null); mockJobStatus(jobId2, Status.FAILED, "error"); mockJobStatus(jobId3, Status.RUNNING, null); heartbeat(); assertEquals(3, mTableMaster.getAllTransformJobInfo().size()); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId1), TABLE1, DEFINITION1, jobId1, Status.COMPLETED, null); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId2), TABLE2, DEFINITION2, jobId2, Status.FAILED, "error"); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId3), TABLE3, DEFINITION1, jobId3, Status.RUNNING, null); restart(); assertEquals(1, mTableMaster.getAllTransformJobInfo().size()); <START> checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId3), TABLE3, DEFINITION1, jobId3, <END> Status.RUNNING, null); mockJobStatus(jobId3, Status.COMPLETED, null); heartbeat(); assertEquals(1, mTableMaster.getAllTransformJobInfo().size()); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId3), TABLE3, DEFINITION1, jobId3, Status.COMPLETED, null); }</code><technical_language>restart, check layout for job1 is transformed layout</technical_language>

Target:
public void jobHistory() throws Exception { assertTrue(mTableMaster.getAllTransformJobInfo().isEmpty()); long jobId1 = transform(TABLE1, DEFINITION1); long jobId2 = transform(TABLE2, DEFINITION2); long jobId3 = transform(TABLE3, DEFINITION1); assertEquals(3, mTableMaster.getAllTransformJobInfo().size()); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId1), TABLE1, DEFINITION1, jobId1, Status.RUNNING, null); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId2), TABLE2, DEFINITION2, jobId2, Status.RUNNING, null); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId3), TABLE3, DEFINITION1, jobId3, Status.RUNNING, null); mockJobStatus(jobId1, Status.COMPLETED, null); mockJobStatus(jobId2, Status.FAILED, "error"); mockJobStatus(jobId3, Status.RUNNING, null); heartbeat(); assertEquals(3, mTableMaster.getAllTransformJobInfo().size()); TransformJobInfo job1Info = mTableMaster.getTransformJobInfo(jobId1); checkTransformJobInfo(job1Info, TABLE1, DEFINITION1, jobId1, Status.COMPLETED, null); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId2), TABLE2, DEFINITION2, jobId2, Status.FAILED, "error"); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId3), TABLE3, DEFINITION1, jobId3, Status.RUNNING, null); restart(); checkLayout(job1Info, TABLE1); assertEquals(1, mTableMaster.getAllTransformJobInfo().size()); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId3), TABLE3, DEFINITION1, jobId3, Status.RUNNING, null); mockJobStatus(jobId3, Status.COMPLETED, null); heartbeat(); assertEquals(1, mTableMaster.getAllTransformJobInfo().size()); checkTransformJobInfo(mTableMaster.getTransformJobInfo(jobId3), TABLE3, DEFINITION1, jobId3, Status.COMPLETED, null); }