stepExecution.setStatus(BatchStatus.COMPLETED);
stepExecution.setExitStatus(ExitStatus.COMPLETED.addExitDescription("We are done."));
final StepExecutionInfoResource stepExecutionInfoResource = new StepExecutionInfoResource(444L, stepExecution,
StepType.TASKLET_STEP.getDisplayName());
final Table table = JobCommandsUtils.prepareStepExecutionTable(stepExecutionInfoResource, TimeZone.getDefault());
assertEquals("Step Execution Id", table.getRows().get(0).getValue(1));
assertEquals("333", table.getRows().get(0).getValue(2));
assertEquals("Job Execution Id", table.getRows().get(1).getValue(1));
assertEquals("444", table.getRows().get(1).getValue(2));
assertEquals("Step Name", table.getRows().get(2).getValue(1));
assertEquals("coolStep", table.getRows().get(2).getValue(2));
assertEquals("Start Time", table.getRows().get(3).getValue(1));
assertEquals("2014-05-01 15:00:00,000", table.getRows().get(3).getValue(2));
assertEquals("End Time", table.getRows().get(4).getValue(1));
assertEquals("2014-05-01 15:01:00,000", table.getRows().get(4).getValue(2));
assertEquals("Duration", table.getRows().get(5).getValue(1));
assertEquals("60000 ms", table.getRows().get(5).getValue(2));
assertEquals("Status", table.getRows().get(6).getValue(1));
assertEquals("COMPLETED", table.getRows().get(6).getValue(2));
assertEquals("Last Updated", table.getRows().get(7).getValue(1));
assertEquals("2014-05-05 01:00:00,000", table.getRows().get(7).getValue(2));
assertEquals("Read Count", table.getRows().get(8).getValue(1));
assertEquals("0", table.getRows().get(8).getValue(2));
assertEquals("Write Count", table.getRows().get(9).getValue(1));
assertEquals("0", table.getRows().get(9).getValue(2));
assertEquals("Filter Count", table.getRows().get(10).getValue(1));
assertEquals("0", table.getRows().get(10).getValue(2));
assertEquals("Read Skip Count", table.getRows().get(11).getValue(1));
assertEquals("0", table.getRows().get(11).getValue(2));
assertEquals("Write Skip Count", table.getRows().get(12).getValue(1));
assertEquals("0", table.getRows().get(12).getValue(2));
assertEquals("Process Skip Count", table.getRows().get(13).getValue(1));
assertEquals("0", table.getRows().get(13).getValue(2));
assertEquals("Commit Count", table.getRows().get(14).getValue(1));
assertEquals("0", table.getRows().get(14).getValue(2));
assertEquals("Rollback Count", table.getRows().get(15).getValue(1));
assertEquals("0", table.getRows().get(15).getValue(2));
assertEquals("Exit Status", table.getRows().get(16).getValue(1));
assertEquals("COMPLETED", table.getRows().get(16).getValue(2));
assertEquals("Exit Description", table.getRows().get(17).getValue(1));
assertEquals("We are done.", table.getRows().get(17).getValue(2));
}