### Question:
ProgressionCommand implements Command, Constant, ReportConstant { public void initialize(Context context, int stepCount) { ProgressionReport report = (ProgressionReport) context.get(REPORT); report.getProgression().setCurrentStep(STEP.INITIALISATION.ordinal() + 1); report.getProgression().getSteps().get(STEP.INITIALISATION.ordinal()).setTotal(stepCount); saveReport(context, true); saveMainValidationReport(context, true); }  void initialize(Context context, int stepCount); void start(Context context, int stepCount); void terminate(Context context, int stepCount); void dispose(Context context); void saveReport(Context context, boolean force); void saveMainValidationReport(Context context, boolean force); @Override boolean execute(Context context); static final String COMMAND; }### Answer:
@Test(groups = { "progression" }, description = "initialize progression command") public void testProgressionInitialize() throws Exception { InitialContext initialContext = new InitialContext(); context.put(INITIAL_CONTEXT, initialContext); JobDataTest jobData = new JobDataTest(); context.put(JOB_DATA, jobData); jobData.setPathName("target/referential/test"); context.put(REPORT, new ActionReport()); ActionReport report = (ActionReport) context.get(REPORT); context.put(VALIDATION_REPORT, new ValidationReport()); context.put(CONFIGURATION, new DummyParameter()); if (d.exists()) try { FileUtils.deleteDirectory(d); } catch (IOException e) { e.printStackTrace(); } d.mkdirs(); progression = (ProgressionCommand) CommandFactory.create(initialContext, ProgressionCommand.class.getName()); log.info(report); progression.initialize(context, 2); File reportFile = new File(d, REPORT_FILE); File validationFile = new File(d, VALIDATION_FILE); Assert.assertTrue(reportFile.exists(), REPORT_FILE + "should exists"); Assert.assertFalse(validationFile.exists(), VALIDATION_FILE + "should not exists"); Assert.assertNotNull(report.getProgression(), "progression should be reported"); Assert.assertEquals(report.getProgression().getCurrentStep(), STEP.INITIALISATION.ordinal() + 1, " progression should be on step init"); Assert.assertEquals(report.getProgression().getSteps().get(0).getTotal(), 2, " total progression should be 2"); Assert.assertEquals(report.getProgression().getSteps().get(0).getRealized(), 0, " current progression should be 0"); }